New Features in C# 2.0—Implement GetEnumerator with Complex Data Structures
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| CSharp-Online.NET:Tutorials |
| C# Tutorials |
| © 2005 O'Reilly Media, Inc. |
Implement GetEnumerator with Complex Data Structures
To add an iterator to your original LinkedList class, you’ll implement
IEnumerable<T> on both LinkedList and the Node class:
public class LinkedList<T> : IEnumerable<T> public class Node<T> : IComparable<Node<T>>, IEnumerable<Node<T>>
|

