Current .Net Version: 2.0.50727
Home
Articles
C# & .Net Framework Reference
Practice C# Online
XML Web Services
RSS Feeds
Code Snippets
T-SQL Scripts
Videos
Valuable Links
Contact Us
Mike's C#, VS.NET and SQL Blog




ROR XML Info.
C# & .Net Framework Reference
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

 
COPYRIGHT/DISCLAIMER | CONTACT US