When is it necessary to override Equals() in a .NET class?

Posted by Alex Angas on Stack Overflow See other posts from Stack Overflow or by Alex Angas
Published on 2010-06-07T23:19:09Z Indexed on 2010/06/07 23:22 UTC
Read the original article Hit count: 151

Filed under:
|

.NET contains its own equality comparison functionality, however I don't really understand how it works.

If the desired Equals() and == behaviour is to verify that every field of an object is equal to every field of another object, is it necessary to override Equals() with a method that does this explicitly?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about equality