129-if语句

分支-if语句 使用if语句可以有条件的执行某段代码

if的语法
if(<test>)
<code executed if <test> is true>

先执行<test>,如果结果是true就执行


案例:

bool var1 = true;
if(var1)
Console.WriteLine(var1);

  

猜你喜欢

转载自www.cnblogs.com/wuxiaohui1983/p/9969615.html
129
今日推荐