一、可枚举类型
枚举器-Enumerator 是一个只读且只能在值序列向前移动的游标
枚举器需要实现下列接口之一
System.Collections.IEnumerator
System.Collections.Generic.IEnumerator<>
他拥有
Current和MoveNext方法
二、迭代器
yield return xxx:
yield break;
一、可枚举类型
枚举器-Enumerator 是一个只读且只能在值序列向前移动的游标
枚举器需要实现下列接口之一
System.Collections.IEnumerator
System.Collections.Generic.IEnumerator<>
他拥有
Current和MoveNext方法
二、迭代器
yield return xxx:
yield break;