Question: Which of the following is the correct way to access all elements of the Stack collection created using the C#.NET code snippet given below?
Options
A : IEnumerable e; e = st.GetEnumerator(); while (e.MoveNext()) Console.WriteLine(e.Current);
B : IEnumerator e; e = st.GetEnumerable(); while (e.MoveNext()) Console.WriteLine(e.Current);
C : IEnumerator e; e = st.GetEnumerator(); while (e.MoveNext()) Console.WriteLine(e.Current);
D : IEnumerator e; e = Stack.GetEnumerator(); while (e.MoveNext()) Console.WriteLine(e.Current);
Previous ||
Collection Classes - General Questions more questions
Which of the following is NOT an interface declared in....
Suppose value of the Capacity property of ArrayList Collection is....
Which of the following is an ordered collection class?
Which of the following is the correct way to find....
Which of the following statements are correct about a HashTable....
Which of the following statements is correct?
Which of the following statements is correct about the C#.NET....
Which of the following ways to create an object of....
Which of the following statements are correct about static functions?
Which of the following statements is correct about constructors?
Attributes - General Questions more Online Exam Quiz
Attributes - General Questions
Classes and Objects - General Questions
Constructors - General Questions