C # (. NET) Essays

Source: Internet
Author: User

1. Access permission modifiers

Private: A privately owned member that can be accessed within a class.

Protected: A protected member that can be accessed within the class and in the inheriting class.

Public: Common members, completely public, without access restrictions.

Internal: Can be accessed in the current assembly.

The default modifier for the class is internal

2. Nullable type (Nullable)

Grammar:< data_type>? <variable_name> = null;

    int? num1 = null;

int? num2 = ;

3 Class (abstract)

A) Abstract classes cannot be instantiated directly.

b) can contain abstract methods, ordinary classes cannot.

4.Static Static

A) in a non-static class, there can be instance members or non-static members

b) cannot have instance members in a static class

c) When you invoke an instance member, you need to use the object name. Instance members;

When you call a static member, you need to use the class name. static members;

C # (. NET) Essays

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.