2
(1)访问类的静态成员的基本方法 ··················································· 13
(2)类静态成员的特性 ·································································· 14
(3)类实例成员与静态成员的访问规则 ············································· 15
2.4 类的属性 ······················································································ 16
2.5 深入理解类与对象 ·········································································· 18
(1) 类和对象的区别 ··································································· 18
(2)类的构造函数 ········································································ 19
(3)引用类型与值类型 ·································································· 19
3 命名空间与类库 ······················································································ 22
3.1 命名空间 ······················································································ 22
3.2 类库 ···························································································· 23
4 继承 ····································································································· 25
4.1 继承概念的引入 ············································································· 25
4.2 类成员的访问权限 ··········································································· 26
(1)public 和 private ······································································ 26
(2)protected ··············································································· 27
(3)internal ················································································· 28
4.3 子类父类变量的相互赋值 ································································· 30
4.4 方法重载、隐藏与虚方法调用 ···························································· 31
(1)重载(overload) ··································································· 31
(2)隐藏(Hide)
········································································ 31
(3)重写(override)与虚方法调用 ·················································· 33
5 抽象基类与接口 ····················································································· 35
5.1 抽象类与抽象方法 ·········································································· 35
5.2 抽象属性 ······················································································ 36
5.3 接口 ···························································································· 37
(1)接口的定义与使用 ·································································· 37
(2)显式实现接口 ········································································ 39
6 多态 ····································································································· 40
6.1 继承多态 ······················································································ 40
6.2 接口多态 ······················································································ 44
7 委托 ····································································································· 47
7.1 理解委托的概念 ·············································································· 47
7.2 委托的组合与分解 ·········································································· 49
8 事件 ····································································································· 51
8.1 事件与多路委托 ············································································· 51
8.2 Visual Studio 窗体事件机制剖析 ·························································· 53
8.3 事件小结 ······················································································ 56