In which order Stack collection class returns data ?
First In First Out
Last In First Out
It depends on the order in which we are removing data programmatically.
None of the above.
In the below sample code last item is removed when Pop method is called for First time.
Stack s = new Stack();
Console.WriteLine(name);//Kishore is the output since last inserted item is deleted first
Back To Top