C # reference: Internal keyword usage Summary

Source: Internet
Author: User

Recently, I am busy with the implementation of the print function on Silverlight, usingReport Definition Language(RDL)(SQL Server is defined based on reports ). Generally, a data format in a project needs to be converted to a common data format, which generates various types of documents (such as PDF and BMP ).

When defining the control class of the frameworkInternalThe access modifier has a deep understanding and usage, which is summarized as follows for your reference:

1.InternalA keyword is an access modifier for type and type members. Internal members are only in the sameProgramCentralized files are accessible. For more information about the Assembly, see components and assembly.

2. Internal access is usually usedComponent-basedBecause it enables a group of parts to cooperate in private mode, without havingCode.

For example, a framework used to generate a graphical user interface can provide "controls" and "forms" classes. These classes work together by using members with internal access capabilities. Since these members are internal, they are not made public to the code that is using the framework.

It is wrong to reference a member outside the Assembly that defines members with internal access capabilities.

WarningAlthough it cannot be rewritten using C #Internal VirtualMethod, but it can be rewritten in some languages (such as using the text Microsoft intermediate language (msil) of ilasm.exe.RelatedInternalFor more information, seeAccessibility level.

To be continued...

 

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.