See thread title. Can I safely do something like that without worrying about a NullReferenceException, or is not guaranteed that those boolean expressions will be evaluated left to right?
// can this throw an NRE?
if (obj == null || obj.property == value)
{
// do something
}
They will be evaluated left to right, guaranteed. So yes, its safe.
http://msdn.microsoft.com/en-us/library/6373h346%28VS.71%29.aspx