Tutorial by Examples

In its most basic form, an object that implements IEnumerable represents a series of objects. The objects in question can be iterated using the c# foreach keyword. In the example below, the object sequenceOfNumbers implements IEnumerable. It represents a series of integers. The foreach loop iterate...
Implementing the IEnumerable interface allows classes to be enumerated in the same way as BCL collections. This requires extending the Enumerator class which tracks the state of the enumeration. Other than iterating over a standard collection, examples include: Using ranges of numbers based on a...

Page 1 of 1