摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace ConsoleApplication3{ class P 阅读全文
posted @ 2016-03-12 15:53 肆季风 阅读(215) 评论(0) 推荐(0) 编辑
摘要: namespace ConsoleApplication3 { class Program { static void Main(string[] args) { // Person2.SayHello(); Person2 p2 = new Person2(); int m= p2.AddPara 阅读全文
posted @ 2016-03-12 15:10 肆季风 阅读(1914) 评论(0) 推荐(0) 编辑
摘要: 索引器允许类或者结构的实例按照与数组相同的方式进行索引取值,索引器与属性类似,不同的是索引器的访问是带参的。 索引器和数组比较: (1)索引器的索引值(Index)类型不受限制 (2)索引器允许重载 (3)索引器不是一个变量 索引器和属性的不同点 (1)属性以名称来标识,索引器以函数形式标识 (2) 阅读全文
posted @ 2016-03-12 14:54 肆季风 阅读(152) 评论(0) 推荐(0) 编辑