C # encapsulation, inheritance, polymorphism of Object-Oriented Programming & lt; Mind Map & gt;

Source: Internet
Author: User

C # three features of object-oriented programming:

  • Encapsulation
  • Inheritance
  • Polymorphism

1. Encapsulation

The interaction and interaction process between objects are mainly achieved through the message mechanism. Objects do not need to be too familiar with the specific status or motion rules of the other party. Object-oriented classes are well-encapsulated modules. class definitions display their descriptions (User-visible external interfaces) and implementations (User-invisible internal implementations) separately, its internal implementation provides protection according to its specific scope.Class is the most basic unit of encapsulation.

2. Inheritance

Inheritance is the process of creating a new class for an existing class. The existing class is called the parent class, and the new class is called the subclass. The subclass can access the attributes and methods of the parent class.

3. Polymorphism

Polymorphism means that methods with the same name can have different running rules in different classes.

The following is a C # Object-Oriented Programming thought map of encapsulation, inheritance, and polymorphism. For full screen viewing, click:

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.