Hello everyone,
I am wondering why do we need to derive some type from IEnumerator
I think using IEnumerator
thanks in advance,
George
Hello everyone,
I am wondering why do we need to derive some type from IEnumerator
I think using IEnumerator
thanks in advance,
George
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
George GeorgePosted May 3, 2008, 11:49 PM
Thanks buddy,
What makes me confused is about how to write the constructor of the class which implements IEnumarator, could you show me a sample please?
regards,
George
Posted May 3, 2008, 7:43 PM
Also, its just coding etiquette but you dont technically "derive" from an interface, you implement it. And interface basically says that this certain class (the class that implements it) is guaranteed to have these members. It works nicely in generics, much like a base class, but it does not declare instance members. Meaning you dont have to worry about the base members it contains.