C # Programming Statement notes

Source: Internet
Author: User

Method:

1. When a method (static or instance) is JIT-compiled, the code snippet in memory is a global function and only one copy exists.

2. Method modifiers: protection level, static, virtual function, method signature: Return value, function name, parameter.

Constructor:

1. A method can have only one static constructor, default to private, and cannot add modifiers. Static constructors can only be called by the system to initialize static fields. The call occurs before an app domain can be called only once, before the type is used.

Access modifiers:

1. There are 5 types of access modifiers: private,public,internal,protected,protected internal.

2. Classes, interfaces, and structs that are declared directly in the namespace, can be public , internal, default to internal, struct member types can be public,internal,private, class members can be of type public, Protected,internal,private,protected internal; class and struct members default type is private; Interface members are always public. You cannot add an access modifier enumeration member is always public, and there is no access modifier; delegate similar structures and classes.

C # Programming Statement notes

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.