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
Yield Sample

Full Name:
Yield Sample

Short Name:
Yield Sample

Type of Entity:
C#

Abstract:
This sample shows how to create a list class that implements IEnumerable and the yield keyword to enable foreach iteration over the contents of the list. Two properties are defined, one returning the odd numbers, the other returning the even numbers.

MSDN Source URL:
http://msdn2.microsoft.com/ms173234.aspx

 
COPYRIGHT/DISCLAIMER | CONTACT US