Vidyalelo
C# Programming · Q142

Miscellaneous in C Sharp

Programming · C# Programming · question 142

Q142

Choose the correct statements for the following C# code? public System.Collections.IEnumerator GetEnumerator() foreach (char ch in chrs) yield return ch;

A.
Definition of iterator for MyClass
B.
Implements the GetEnumerator() method defined by IEnumerable
C.
The yield return statement returns the next object in the collection, which in this case is the next character in chrs
D.
All of the mentioned
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board