I'd like to know what is default implementation for equality operatort (== and !=)
Is it?
public static bool operator ==(object obj1, object obj2)
{
return obj1.Equals(obj2);
}
public static bool operator !=(object obj1, object obj2)
{
return !obj1.Equals(obj2);
}
So I only need to override Equals method or do I need to override euality operators as well ?
See Question&Answers more detail:os