int a = 5;
int b = 5;
object oa = a;
object ob = b;
When dealing with reference types (ie objects) the == operator tells you if the objects are actually the same object which they are not
so (oa == ob) is false
Whereas in this instance oa.Equals(ob) is true as it compares the value of the object.
the string object is a special case where == is the same as .Equals
bool b1 = (object)"a" == (object)"a"; //returns true
Paul.
If you want
Reflexology in Sydney then click on the link...