C # 7 in VB programmers

zhaozj2021-02-08  202

Public Sealed Class X

{

}

Internal

If the INTERNAL modifier is placed on a class or member, this class or member can only be used by other classes in the same assembly. This is the same as the Friend modifier in the VB.

Protected

The protected modifier is used to access the class that is born from this class.

Internal protected

INTERNAL protected indicates that INTERNAL or Protected access is allowed.

initialization

In C #, you can set its initial value while a member is declared, thereby simplifying the code. such as:

Public int counter = 100;

Public String Heading = "TOP";

constant

The constants in the C # are the same as the constants in VB, such as:

Const Int m = 10;

Moreover, the flexibility is greatly improved after the calculation is calculated in C #. such as:

Const int n = m * 4;

转载请注明原文地址:https://www.9cbs.com/read-3271.html

New Post(0)