views:

93

answers:

2

I want to know how to save stack in array list?

+5  A: 

In C# 3.0, you'd do:

var list = stack.ToList();  // Returns List<T>
Mehrdad Afshari
A: 
System.Collections.Generic.Stack<int> myStack = new Stack<int>();
System.Collections.ArrayList myList = new System.Collections.ArrayList(myStack);
BlueMonkMN