62,234
社区成员




//只是举个例子
if(a==5)
{
}
else if(a==6)
{
}
if (conditionA) {
do_something_A;
} else if (conditionB) {
do_something_B;
} else {
// 做些事当既不是A也不是B;
}
// 做其他任何事,与上述条件无关;
static void Main(string[] args)
{
if (5 == 5) Console.Write("1");
if (5 == 5) {
Console.Write("2");
};
}
.method private hidebysig static void Main(string[] args) cil managed
{
.entrypoint
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldstr "1"
IL_0005: call void [mscorlib]System.Console::Write(string)
IL_000a: ldstr "2"
IL_000f: call void [mscorlib]System.Console::Write(string)
IL_0014: ret
} // end of method Program::Main