foreach with generic list class

aronmatthew

Active member
Joined
Aug 5, 2019
Messages
42
Programming Experience
Beginner
Does anyone have a List Enumerator example for generic list class. One that inherits from IEnumerator. Such that foreach can be used for generic list class.
 
There should be no need. If you're defining your own collection class then it should inherit Collection<T> and you get that functionality for free. Is there any reason that you can't do that?
 
Back
Top Bottom