VB programmers in the eyes of C # 9

zhaozj2021-02-08  190

Switch in C # is a branch judgment statement, which is similar to the 'Case' statement in VB. such as:

In VB:

Select Case X

Case 1

Func1

Case 2

FUNC 2

End SELECT

In C #:

Switch (x);

{

Case 1:

Func1 ();

Break;

Case 2:

Func2 (0);

Break;

}

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

New Post(0)