To use your class with a foreach loop, you don't have to implement the IEnumerable interface - you simply have to write a public method that matches the signature:
public IEnumerator GetEnumerator()
The Microsoft guys probably thought they could sneak that past us, but they couldn't now, could they?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment