One significant difference between them is that ==
is a static binary operator that works on two instances of a type whereas Equals
is an instance method. The reason this matters is that you can do this:
Foo foo = new Foo()
Foo foo2 = null;
foo2 == foo;
But you cannot do this without throwing a NullReferenceException
:
Foo foo = new Foo()
Foo foo2 = null;
foo2.Equals(foo);