Possible Duplicate:
Why does one often see “null != variable” instead of “variable != null” in C#?
Is there any difference between checking for null in the following ways:
object x;
// more code to work on x
if (null == x)
return;
and
object x;
// more code to work on x
if (x == null)
return;
I think its just a style preference and there is nothing wrong (code logic or performance) with it but wanted to check. I think the later is easier to read but my colleague insists on writing it the first way. It drives me nuts. Thanks.