Go to my github

NetFrameWork学习 Dictionary 泛型类 表示键和值的集合。



命名空间: using System.Collections.Generic;

C# Dictionary 终极使用方法

 Dictionary 排序

 List<KeyValuePair<int, string>> list = new List<KeyValuePair<int, string>>(dic);
 list.Sort();

最近寫案子常常用到List<T>,這個東西還真好用

因為它有下列東西:

List<T>.Sort() → 排序T

List<T>.Find() → 找出一個T

List<T>.FindAll() →找出多個T

List<T>.Exist() →判斷T是否存在

posted @ 2011-03-30 16:26  峡谷少爷  阅读(283)  评论(0编辑  收藏  举报