摘要:
(一)功能: (1)可以存储任何类型的元素 (2)保证数据安全 (3)能省去装箱拆箱的性能开销 (二)常用的泛型集合 :List<T>类,Dictionary<K,V>类,stack<T>类,Queue<T>类 (三)语法 1.声明是什么类型的,则添加的元素必须是该类型 List<int> scor 阅读全文
posted @ 2018-01-14 21:10
helloWorldhelloWorld
阅读(91)
评论(0)
推荐(0)
摘要:
1.push将对象插入 System.Collections.Generic.Stack<T> 的顶部。 Stack st = new Stack(); //栈是先进后出 st.Push(1); st.Push(2); st.Push(3); st.Push(4); 2.peek读栈 (1) for 阅读全文
posted @ 2018-01-14 20:42
helloWorldhelloWorld
阅读(115)
评论(0)
推荐(0)