Queue q = new Queue(); q.Enqueue("Sachin"); q.Enqueue('A'); q.Enqueue(false); q.Enqueue(38); q.Enqueue(5.4);
IEnumerator e;
e = q.GetEnumerator();
while (e.MoveNext())
Console.WriteLine(e.Current);
IEnumerable e;
e = q.GetEnumerator();
while (e.MoveNext())
Console.WriteLine(e.Current);
IEnumerator e;
e = q.GetEnumerable();
while (e.MoveNext())
Console.WriteLine(e.Current);
IEnumerator e;
e = Queue.GetEnumerator();
while (e.MoveNext())
Console.WriteLine(e.Current);
IEnumerator e;
e = q.GetEnumerator();
while (e.MoveNext())
Console.WriteLine(e.Current);
Stack st = new Stack(); st.Push(11); st.Push(22); st.Push(-53); st.Push(33); st.Push(66);
IEnumerable e;
e = st.GetEnumerator();
while (e.MoveNext())
Console.WriteLine(e.Current);
IEnumerator e;
e = st.GetEnumerable();
while (e.MoveNext())
Console.WriteLine(e.Current);
IEnumerator e;
e = st.GetEnumerator();
while (e.MoveNext())
Console.WriteLine(e.Current);
IEnumerator e;
e = Stack.GetEnumerator();
while (e.MoveNext())
Console.WriteLine(e.Current);
IEnumerator e;
e = st.GetEnumerator();
while (e.MoveNext())
Console.WriteLine(e.Current);
Copyright ©CuriousTab. All rights reserved.