摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; namespace 创建带属性的XML文档 { class Program { static ... 阅读全文
posted @ 2016-10-24 23:28 影落明湖 阅读(354) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; namespace 创建XML { class Program { static void M... 阅读全文
posted @ 2016-10-24 23:27 影落明湖 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 索引器(C# 编程指南) Visual Studio 2015 其他版本 索引器允许类或结构的实例就像数组一样进行索引。 索引器类似于属性,不同之处在于它们的取值函数采用参数。 在下面的示例中,定义了一个泛型类,并为其提供了简单的 get 和 set 取值函数方法(作为分配和检索值的方法)。 Program 类创建了此类的一个实例,用于存储字符串。 C# class SampleColl... 阅读全文
posted @ 2016-10-24 22:29 影落明湖 阅读(275) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Threading.Tas... 阅读全文
posted @ 2016-10-24 21:25 影落明湖 阅读(302) 评论(0) 推荐(0) 编辑
摘要: //练习:把123转换为:壹贰叁。Dictionary "1一 2二 3三 4四 5五 6六 7七 8八 9九" string str = "1一 2二 3三 4四 5五 6六 7七 8八 9九"; //123 一二三 Dictionary dic = new Diction... 阅读全文
posted @ 2016-10-23 10:44 影落明湖 阅读(476) 评论(0) 推荐(0) 编辑
摘要: //案例:把分拣奇偶数的程序用泛型实现。int[] nums={1,2,3,4,5,6,7,8,9};奇数在左边 偶数在右边 int[] nums = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; List listJi = new List(); List listOu = new List(); ... 阅读全文
posted @ 2016-10-23 09:42 影落明湖 阅读(786) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _计算形状 { class Program { static void Main(string[] args)... 阅读全文
posted @ 2016-10-23 09:40 影落明湖 阅读(943) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace 简单工厂设计模式计算器 { class Program { static void Main(string[] ... 阅读全文
posted @ 2016-10-21 22:29 影落明湖 阅读(195) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _模拟磁盘打开文件 { class Progra... 阅读全文
posted @ 2016-10-21 20:44 影落明湖 阅读(316) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.... 阅读全文
posted @ 2016-10-20 20:52 影落明湖 阅读(318) 评论(0) 推荐(0) 编辑