As an object-oriented language, c# supports the three core principles of
object-oriented programming:
- Encapsulation - Hide implementation details in a class
from users of the class, exposing only a public interface
- Inheritance - Derive a subclass from a parent class,
inheriting data and behavior from the parent, in an "is-a" relationship.
Inheritance defines a hierarchy of classes. All classes ultimately inherit
from System.Object.
- Polymorphism - Any subtype may be used where a parent
type (or type higher up in the class hierarchy) is expected. Conversely, a
variable of a particular class will be treated as the apporiate subclass.
The Core Principles of Object-Oriented Programming,布布扣,bubuko.com
The Core Principles of Object-Oriented Programming
原文:http://www.cnblogs.com/yuthreestone/p/3591668.html