With correct design, there is no difference between "a == 5" and "5 == a". But there is some special situation, where has "a == 5" and "5 == a" different behaviour. It's very unpropably, but it is posible.
Nevertheless this example is constructed for demonstration of the situation, and I does not recomend do thinks such this.
Example:
public class BadClass {
public int Value;
public static implicit operator int( BadClass c ) {
return c.Value;
}
//public static implicit operator BadClass( int n ) {
// return new BadClass { Value = n };
//}
public static bool operator ==( BadClass c, int n ) {
return (c.Value + 1 == n);
}
public static bool operator !=( BadClass c, int n ) {
return (c.Value + 1 != n);
}
public override bool Equals( object obj ) {
if ( obj is int ) {
return (this == (int)obj);
}
else {
return base.Equals( obj );
}
}
public override int GetHashCode() {
return base.GetHashCode();
}
}
...
BadClass a = new BadClass { Value = 13 };
var rslt_1 = (13 == a); //there will be true
var rslt_2 = (a == 13); //there will be false