How to: Create an Iterator Block for a Generic List (C#)
Full Name:
How to: Create an Iterator Block for a Generic List (C#)
Short Name:
How to: Create an Iterator Block for a Generic List (C#)
Type of Entity:
C#
Abstract:
In this example the generic class Stack implements the generic interface IEnumerator. An array of the type T is declared and assigned values by using the method Push. In the GetEnumerator method, the values of the array are returned using the yield return statement.
MSDN Source URL:
http://msdn2.microsoft.com/ee5kxzk0.aspx