Depth. NET Framework

Source: Internet
Author: User

Packaging
is one of the three main characteristics of object-oriented
A separate entity with undivided cut
Hide the internal details
Preserving external interfaces
Authorization by Access modifier
Class is one of the most basic packages
Benefits of Encapsulation
Ensure data security
Provides a clear external interface
The internal implementation of the class can be arbitrarily modified without affecting other classes

Class is a concept
Defining classes
Class PM
{
Omit member
}
object is an entity
Creating objects
PM Pm=new pm ();
Get Set accessor guarantees field security in a class

2. Relationship between classes and objects Dept dept=new Dept ();
Parsing: A class is the type of object (big kind) code plane: Dept
An object is an instance of a class (a specific individual) the Code plane: Dept


3..NET Framework two main components: CLR (Common Language Runtime Common Language Runtime) and FCL (Framework class Library)

4. Class Library Concept: A collection of functionally similar classes.
Similar to the main program of QQ support class library, the end of the DLL file (dynamic linked library dynamically linked libraries)
Two kinds of embodiment of class library: exe DLL

5. Encapsulation: is to protect some private field security. Embodiment 2: Put the method and the field into a container (class).

6. Automatic attributes
Note: When we do not need to make a logical decision, he is equivalent to the private field + common attributes.
Automatic attribute Bottom generation: Private field + Public property

Depth. NET Framework

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.