views:

801

answers:

3

Description for Assert.Equals() from the MSDN Documentation: Do not use this method.

That's it, the full explanation. Uh.. ok, but then ... why is it there? Is it a deprecated method from an earlier version of the framework? Something that's supposed to be used only by other Microsoft Assemblies?

It just makes me want to use it all the more knowing I'm not supposed to. ;-)

Does anyone know?

+10  A: 

.Equals is inherited from object. It's listed as "Do not use this method" so users won't confuse it with the AreEqual method.

David Morton
+2  A: 

All objects in .NET derive from Object.

Object has a .Equals() method.

Apparently the .Equals() method for this particular object doesn't do anything useful, so the docs are warning you that it doesn't do anything useful.

Ryan
+1  A: 

It was changed in 2008 (Maybe SP1) to fail a test when called, so that people who were using it by accident were told they really shouldn't be using it.

dhopton