Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何将堆栈保存在数组列表中?
在 C# 3.0 中,您可以:
var list = stack.ToList(); // Returns List<T>
System.Collections.Generic.Stack<int> myStack = new Stack<int>(); System.Collections.ArrayList myList = new System.Collections.ArrayList(myStack);