摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace 面向对象之多态{ class Program ... 阅读全文
posted @ 2015-08-04 14:34 骏码信息 阅读(128) 评论(0) 推荐(0) 编辑
摘要: using (StreamReader sr = new StreamReader(@"C:\Users\shuai\Desktop\文件流读取.txt", Encoding.Default)) { while (!sr.E... 阅读全文
posted @ 2015-08-04 10:51 骏码信息 阅读(222) 评论(0) 推荐(0) 编辑
摘要: //------------使用文件流来实现多媒体文件的复制--------------- //思路:就是先要将复制的多媒体文件读取出来,然后写入到你指定的位置。 string source = @"C:\Users\shuai\D... 阅读全文
posted @ 2015-08-03 15:25 骏码信息 阅读(267) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;namespace 文件流{ class... 阅读全文
posted @ 2015-08-03 14:36 骏码信息 阅读(292) 评论(0) 推荐(0) 编辑
摘要: //将一个数组中的奇数放到一个集合中,再将数组的偶数放到另一个集合中。 //最终将两个集合合并为一个集合,并且奇数显示在左边,偶数显示在右边。 int[] nums = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; ... 阅读全文
posted @ 2015-08-03 11:26 骏码信息 阅读(796) 评论(0) 推荐(0) 编辑
摘要: List list = new List(); list.Add(1); list.Add(2); list.Add(3); list.AddRange(new int[] { 1, 2,... 阅读全文
posted @ 2015-08-03 09:40 骏码信息 阅读(206) 评论(0) 推荐(0) 编辑
摘要: string str = "今天天气好晴朗,处处好风光。"; //需要将字符串转化成字节数组 byte[] buffer = Encoding.Default.GetBytes(str); File.Write... 阅读全文
posted @ 2015-08-02 21:43 骏码信息 阅读(372) 评论(0) 推荐(0) 编辑
摘要: File.Create(@"C:\Users\shuai\Desktop\new.txt"); Console.WriteLine("创建成功"); Console.ReadKey(); File.Delete... 阅读全文
posted @ 2015-08-02 15:06 骏码信息 阅读(180) 评论(0) 推荐(0) 编辑
摘要: //写一个长度为10的集合,要求在里面随机存放10个数字(0-9); //但是要求所有的数字不重复。 ArrayList list = new ArrayList(); Random r = new Rando... 阅读全文
posted @ 2015-08-02 10:21 骏码信息 阅读(338) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Collections;namespace 集合的小... 阅读全文
posted @ 2015-08-02 10:07 骏码信息 阅读(711) 评论(0) 推荐(0) 编辑