Do else if statements exist in C#?

前端 未结 8 1567
感动是毒
感动是毒 2021-02-01 12:51

I have come across the following code in C#.

if(condition0) statement0;
else if(condition1) statement1;
else if(condition2) statement2;
else if(condition3) state         


        
8条回答
  •  礼貌的吻别
    2021-02-01 13:27

    The construct else if is never mentioned in the C# specification, except in some examples where it is used without explanation. So I do not think it is a special construct, it is just nested if statements.

提交回复
热议问题