Is there a difference between i==0 and 0==i?

后端 未结 8 1406
我在风中等你
我在风中等你 2020-11-27 22:51

First code:

  if(i==0) {// do instructions here}

Second code:

  if(0==i) { // do instructions here }

What

8条回答
  •  鱼传尺愫
    2020-11-27 23:25

    Yep they are same as far as C# is concerned. For more complex situations visit A==B vs B==A, What are the differences

提交回复
热议问题