摘要: FileStream fsRead = new FileStream(@"C:\Users\Administrator\Desktop\u.html",FileMode.OpenOrCreate,FileAccess.Read); byte[] buffer = new ... 阅读全文
posted @ 2015-05-18 22:55 自由无风 阅读(768) 评论(0) 推荐(0) 编辑
摘要: Dictionary dc = new Dictionary(); dc.Add(1, "看了"); dc.Add(2, "没看"); dc.Add(3, "不知道"); dc[1] = "哈哈"; ... 阅读全文
posted @ 2015-05-17 22:32 自由无风 阅读(507) 评论(0) 推荐(0) 编辑
摘要: //创建list泛型集合 List ilist = new List(); ilist.Add(1); ilist.Add(9); ilist.AddRange(new int[] { 23... 阅读全文
posted @ 2015-05-17 09:36 自由无风 阅读(681) 评论(0) 推荐(0) 编辑
摘要: //创建文件 //File.Create(@"D:\a.txt"); //Console.WriteLine("创建成功"); ////删除文件 //File.Delete(@"D:\a.txt"); ... 阅读全文
posted @ 2015-05-17 09:25 自由无风 阅读(4675) 评论(0) 推荐(0) 编辑
摘要: //Hashtable键值集合 键必须是维一的 类似于索引 Hashtable ht = new Hashtable(); ht.Add(1, "中国"); ht.Add(2, 123); ht.Add(... 阅读全文
posted @ 2015-05-16 20:45 自由无风 阅读(391) 评论(0) 推荐(0) 编辑
摘要: ArrayList list = new ArrayList(); Random rd = new Random(); for (int i = 0; i <10; i++) { int rNumbe... 阅读全文
posted @ 2015-05-16 20:08 自由无风 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 子类可以调用,但实例化的对像不可调用 new object; 阅读全文
posted @ 2015-05-16 19:44 自由无风 阅读(160) 评论(0) 推荐(0) 编辑
摘要: ArrayList alist = new ArrayList(); //集合对像 长度可以改变,类型不限 //添加单个元素可以Add() alist.Add("在在的"); alist.Add(35);... 阅读全文
posted @ 2015-05-16 18:54 自由无风 阅读(1349) 评论(0) 推荐(0) 编辑
摘要: Console.WriteLine("输入字符1"); string n1 = Console.ReadLine(); Console.WriteLine("输入字符2"); string n2 = Console.ReadLin... 阅读全文
posted @ 2015-05-14 21:36 自由无风 阅读(11592) 评论(0) 推荐(0) 编辑
摘要: string str = "af adsf e4afef3 _asdf $adsf"; char[] chr = { ' ', '_', '$' }; //StringSplitOptions.RemoveEmptyEntries去掉空格 ... 阅读全文
posted @ 2015-05-13 22:34 自由无风 阅读(176) 评论(0) 推荐(0) 编辑