Is there any way in C# to override a class method with an extension method?

No; an extension method never takes priority over an instance method with a suitable signature, and never participates in polymorphism (GetHashCode is a virtual method).

Leave a Comment