Possible Duplicate:
== Operator and operandsC#布尔表达式求值顺序Possible Duplicates:
Is there any difference between if(a==5) or if(5==a) in C#?
== Operator and operands
好吧,这可能是愚蠢的问题,但在谷歌搜索(不能似乎实际搜索即使报价精确短语)
如果什么什么差别有
之间if(false == <somecondition>){
和
if(<somecondition> == false){
in C#?我熟悉C#的表情评价;以及了解秩序将如何明智的,如果你在做一样的东西:
if(AccountIsInvalid || AccountIsUnregistered)
我不需要一个巨大的教训,但想明白为什么有些人喜欢做与false==....
路线的东西。
很多...的重复...现在看... – 2009-11-16 22:43:08
当然,使用'if(!)'并且它变成一个非问题; -p –
2009-11-16 22:43:51
一个重复在这里 - http://stackoverflow.com/questions/797162/is-there-any-difference-between-ifa5-or-if5a-in-c-closed – ChrisF 2009-11-16 22:45:23