文章分类 -  C#_数组ArrayList/Hasttable等

摘要:class Program { static void Main( string[] args) { //两个集合{ “a”,“b”,“c”,“d”,“e”}和{ “d”, “e”, “f”, “g”, “h” },把这两个集合去除重复项合并成一个 ArrayList ary1 = new ArrayList { "a" , "b" , "c", "d" , "e" }; ArrayList ary2 = new ArrayList { "d" , "e" 阅读全文
posted @ 2013-03-31 09:35 C#老头子 阅读(192) 评论(0) 推荐(0)
摘要:class Student { public Student(string name, int age) { this .name = name; this .age = age; } private string name; public string Name { get { return name; } set { ... 阅读全文
posted @ 2013-03-31 09:30 C#老头子 阅读(194) 评论(0) 推荐(0)
摘要:1.ArrayList对值类型的操作 //ArayList对值类型的操作 class Program { static void Main( string[] args) { //ArrayList与数组没多大的区别 优点在于不像数组需规定长度 缺点是数据类型不限制 什么类型数据都可以放入 这样会出现许多错误 ArrayList arylist = new ArrayList(); //ArrayList添加 arylist.Add(1000); ... 阅读全文
posted @ 2013-03-31 09:24 C#老头子 阅读(266) 评论(0) 推荐(0)