摘要: 1、Dictionary集合 Dictionary<int, string> dic = new Dictionary<int, string>(); dic.Add(1, "张三"); dic.Add(2, "李四"); dic.Add(3, "王五"); dic.Add(5, "王八"); if 阅读全文
posted @ 2022-03-13 23:38 makaay986 阅读(45) 评论(0) 推荐(0)
摘要: 1、list泛型集合 //ArrayList List<T> //Hashtable Dictionary<Tkey,Tvalue> List<string> list2 = new List<string>(); list2.Add("张三"); list2.Add("男"); list2.Add 阅读全文
posted @ 2022-03-13 23:19 makaay986 阅读(293) 评论(0) 推荐(0)
摘要: 1、装箱、拆箱 1)装箱用的什么类型,拆箱的时候也用什么类型 int n = 10; object o= n; int nn=(int)o; Console.WriteLine(nn); 2、hashtable:键 值集合 字典:拼音 >汉字 //键 >值 //创建了一个键值对集合 Hashtabl 阅读全文
posted @ 2022-03-13 16:12 makaay986 阅读(55) 评论(0) 推荐(0)