I am sorry if this noob question. So we are learning user controls and this bit of code popped up.
private Stack<MyFirstUserControl1> _myControls = new Stack<MyFirstUserControl1>();
private int _controlsInstantiated = 0;
Can you use a class within a Stack? Can anyone explain? Noob question I'm sure...
Stack<MyFirstUserControl1>
仅表示该集合将为MyFirstControl1
类型
堆栈无非就是LIFO队列,因此可以肯定,它只是对象的列表/集合,可以基于后进先出的方式推送和弹出对象,在这种情况下,它是类型MyFirstUserControl1
的实例的列表。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.