How are iterators used in C# ?
suppose I have say:
List<int> someList = new List<int>();
/* assume some items are added here */
/* and now I wonder if C++ style iterators are available? */
for( var i = /* iterator begin of list */ ; i != /* iterator to end of list */; ++i )
{
//use iterator.
}
I understand it's common to use the foreach with C# arrays/containers, but I prefer the normal for( ; ; ) { }.