多语言展示
当前在线:1369今日阅读:86今日分享:14

泛型集合List和Dictionary集合的使用

泛型集合List和Dictionary集合的使用
工具/原料

C#

方法/步骤
1

1.文件--》新建--》项目。

2

2.选择为:控制台应用程序--》命名为:泛型集合List和Dictionary集合的使用。

3

3.系统会自动生成代码。

4

4.List集合测试1:测试当前数据类型。

5

5.List集合测试2:求最大数使用Max()函数方法。

6

6.Dictionary集合使用测试1

7

7.Dictionary集合使用测试2:遍历”键”

8

8.Dictionary集合使用测试3:遍历”值”

9

9.Dictionary集合使用测试4:直接遍历”键值对”

推荐信息