Syntax:
public interface IEnumerable
{
IEnumerator GetEnumerator();
}
IEnumerator provides the ability to iterate through the collection by exposing a Current property and MoveNext and Reset methods. Enumerators can be used to read the data in the collection, but they cannot be used to modify the underlying collection.
Syntax:
public interface IEnumerator
{
object Current { get; }
bool MoveNext();
void Reset();
}
No comments:
Post a Comment