随笔分类 -  C#集合

慢慢学习...
摘要:System.Collections; 是一个数组链表,具有数组的功能,也有链表的特色。View Code 1 using System; 2 using System.Collections.Generic; 3 public class StudyList1 4 { 5 public static void Main() 6 { 7 List<IWuDang> list = new List<IWuDang>(); 8 list.Add(new People(){Name = "one"}); 9 list.Add(new... 阅读全文
posted @ 2012-08-04 14:58 妍珊 阅读(539) 评论(0) 推荐(0)
摘要://链表可以加多个元素using System;using System.Collections.Generic; public class studyList { public static void Main() { List<string> list = new List<string>(); list.Add("sdhguew"); //链表可以加多个元素 List<string> list1 = new List<string>(); list1.Add("苹果"); list1.Add(&quo 阅读全文
posted @ 2012-08-04 14:55 妍珊 阅读(399) 评论(0) 推荐(0)
摘要:实现了,ICollection和IEnumerable接口。 方法 Add(object,object) 通过索引来获得值我们学习吧...View Code 1 using System; 2 using System.Collections; 3 public class HashTable 4 { 5 public static void Main() 6 { 7 Hashtable ht = new Hashtable(); 8 ht.Add("three","石头"); 9 ht.Add(5,5);10 ... 阅读全文
posted @ 2012-08-04 14:53 妍珊 阅读(311) 评论(0) 推荐(0)