摘要: 委托(dekegate)是一种动态调用方法的类型,与类、接口和数组相同,属于引用型,可以用来实现多路广播(MulticastDelegate)。多路广播(MulticastDelegate):可以用"+""-"将多个委托对象合并、移除,可以使用"+="添加委托对象,"-="移除委托对象。委托的特点:... 阅读全文
posted @ 2015-10-11 21:40 致林 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 属性(property):public string Name{ get { return _name; } set { _name = value; }} 简写为:public string Name { set; get;}索... 阅读全文
posted @ 2015-10-11 20:50 致林 阅读(7719) 评论(0) 推荐(1) 编辑
摘要: 接口(interface)接口泛指实体把自己提供给外界的一种抽象化物(可以为另一实体),用以由内部操作分离出外部沟通方法,使其能被修改内部而不影响外界其他实体与其交互的方式。接口实际上是一个约定:如:IClonable, IComparable;接口是抽象成员的集合:ICloneable含有方法cl... 阅读全文
posted @ 2015-10-11 19:09 致林 阅读(13567) 评论(0) 推荐(0) 编辑
摘要: 枚举型实质就是使用符号来表示的一组相互关联的数据.Season currentSeason,nextSeason;currentSeason = Season.Spring;nextSeason = currentSeason + 1;Console.WriteLine("当前季节为:{0},{1}... 阅读全文
posted @ 2015-10-11 14:12 致林 阅读(408) 评论(0) 推荐(0) 编辑