C#随堂

顺序语句

上到下执行

分支语句

if    else

switch()

{

  case 1:

    Console.WriteLine(1);

    break;

  case 2:

    Console.WriteLine(2);

    break;

  case 3:

    Console.WriteLine(3);

    break;

}

三元表达式

string a =true ? "1" : "2" ;    ★★★★★★

循环语句

for循环

while循环

原文地址:https://www.cnblogs.com/TheJoker/p/7760095.html