对象
介绍
.NET Framework 遵循“面向对象程序设计”的软件开发方法,在该标准下,所有对象都支持:
- 继承(Inheritance): 继承和拓展现有功能
- 封装(Encapsulation): 允许用户查看特定部分,并通过特定访视与之交互
- 多态(Polymorphism): 允许动态分配对象,但可以预测对象的行为
- Inheritance - the ability to inherit and extend existing functionality.
- Encapsulation - the ability to allow the user to only see specific parts, and to interact with it in specific ways.
- Polymorphism - the ability for an object to be assigned dynamically, but with some predictability as to what can be done with the object.
存在两种类型的对象:
- 引用类型(Reference types)
- 值类型(Value types)