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