首页 > 其他 > 详细

The Core Principles of Object-Oriented Programming

时间:2014-03-11 04:15:34      阅读:459      评论:0      收藏:0      [点我收藏+]

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!