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

📄 entitysetenumerator.cs

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

namespace EnterpriseObjects
{
	/// <summary>
	/// Summary description for EntitySetEnumerator.
	/// </summary>
	public class EntitySetEnumerator : IEnumerator
	{
		// members...
		public int TableIndex;
		public EntitySet EntitySet;
		public int Position = -1;

		// constructor...
		public EntitySetEnumerator(EntitySet entitySet) : this(0, entitySet)
		{
		}

		public EntitySetEnumerator(int tableIndex, EntitySet entitySet)
		{
			this.TableIndex = tableIndex;
			this.EntitySet = entitySet;
		}

		public object Current
		{
			get
			{
				return EntitySet.GetEntity(TableIndex, Position);
			}
		}

		public bool MoveNext() 
		{
			if(Position == EntitySet.GetCount(TableIndex) - 1)
				return false;
			Position += 1;
			return true;
		}

		public void Reset()
		{
			Position = -1;
		}
	}
}

⌨️ 快捷键说明

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