Please explain me what is different between this two statement.
first statement throw the exception and second one returns the Boolean value
Version a = null;
if(a.Equals(null)) // throw the exception
if(Equals(a,null)) // return the bool value true
You cannot call
a.Equalswithout initializingawith an object, otherwise it will throwNullReferenceExcption, ButEqualsis a static method, it checks whether the two references passed to it are same or not, these references can have null values.