Answer Posted / gp_bellamkonda
What Sumit suggested was correct.Adding few more points to
it.
--The iterator code uses the yield return statement to
return each element in turn. yield break ends the
iteration. For more information, see yield.
--Multiple iterators can be implemented on a class. Each
iterator must have a unique name just like any class
member, and can be invoked by client code in a foreach
statement as follows: foreach(int x in
SampleClass.Iterator2){}
--The return type of an iterator must be IEnumerable,
IEnumerator, IEnumerable<T>, or IEnumerator<T>.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a property in c#?
What are the 3 types of comments in c#?
What is .net console?
How can you force derived classes to provide new method implementations for virtual methods?
What is Wrapper class in dot net?
What is the max value of int32 in c#?
What is the delegate in c#?
What is lambda expression in c#?
What is delegate in c#?
What is out in c#?
3. Use layered architecture for coding. s.no name description 1 abc xxxxxxxxx 2 abc xxxxxxxxx 3 4 5 6 7 8 Select all Clear all Add Delete Name Description Save close
What does a constructor do c#?
Distinguish between finally and finalize blocks?
How do you determine whether a string represents a numeric value?
What is response redirect in c#?