Access modifiers (C # Reference)

Source: Internet
Author: User
Tags modifiers

The first article on the copy of the next MSDN above the things to practice practiced hand it!!!

The access modifier is a keyword that specifies the accessibility of a declared member or type. This section describes the four access modifiers:

    • public                                 

    • protected                                     
    • internal                                  

    • Span id= "MT6" class= "sentence" data-guid= "2c17c6393771ee3048ae34d6b380c5ec" data-source= "Private" >private                                  

Use these access modifiers to specify the following five levels of accessibility:

Public : Access is not restricted.

Protected: Access is limited to types that contain or derive from the containing class.

Internal: Access is limited to the current assembly.

Protected internal: Access is restricted to the current assembly or from a category that contains derived types.

Private: Access is limited to the containing type.

This section also describes the following:

  • Accessibility level: Five levels of accessibility are declared with four access modifiers.

  • Accessible domains: Specifies where in a program section A member can be referenced.

  • Usage restrictions for accessibility levels: Provides an overview of the usage limits for the declared accessibility level.

Access modifiers (C # Reference)

Related Article

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.