⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 entityboundcollection.cs

📁 用于c#.net数据库操作的类库。能把结婚集以数组的形成操作。
💻 CS
字号:
using System;
using System.Collections;

namespace EnterpriseObjects
{
	/// <summary>
	/// Summary description for EntityBoundCollection.
	/// </summary>
	public class EntityBoundCollection : IList
	{
		// members...
		public EntitySet EntitySet;
		public int TableIndex;
												   
		public EntityBoundCollection()
		{
		}

		public class EntityBoundCollectionCannotBeChangedException : ApplicationException
		{
		}

		public int Add(object val)
		{
			throw new EntityBoundCollectionCannotBeChangedException();
		}

		public void Clear()
		{
			throw new EntityBoundCollectionCannotBeChangedException();
		}

		public bool Contains(object val)
		{
			throw new NotImplementedException();
		}

		public void CopyTo(Array array, int index)
		{
			throw new NotImplementedException();
		}

		public int Count
		{
			get
			{
				return EntitySet.GetCount(TableIndex);
			}
		}

		public IEnumerator GetEnumerator()
		{
			return EntitySet.GetEnumerator(TableIndex);
		}

		public int IndexOf(object val)
		{
			throw new NotImplementedException();
		}

		public void Insert(int index, object val)
		{
			throw new EntityBoundCollectionCannotBeChangedException();
		}

		public bool IsFixedSize
		{
			get
			{
				return true;
			}
		}

		public bool IsReadOnly
		{
			get
			{
				return true;
			}
		}

		public bool IsSynchronized
		{
			get
			{
				throw new NotImplementedException();
			}
		}

		public object this[int index]
		{
			get
			{
				return EntitySet.GetEntity(TableIndex, index);
			}
			set
			{
				throw new EntityBoundCollectionCannotBeChangedException();
			}
		}

		public void Remove(object val)
		{
			throw new EntityBoundCollectionCannotBeChangedException();
		}

		public void RemoveAt(int index)
		{
			throw new EntityBoundCollectionCannotBeChangedException();
		}

		public object SyncRoot
		{
			get
			{
				throw new NotImplementedException();
			}
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -