Implement Equality for Reference Types in C#
Implement Equality for Reference Types in C#
CodeProject
Introduction In the last post we discussed about why to implement equality for our value types in c# and we saw how it can help writing more efficient code when writing our own value types as the default implementation in .NET framework for value types uses reflection to check for equality of two value types on the basis of the values they contain so it is always a better option to override the equality behavior for our value types which of course will be a performance gain during execution.