Forced Override of Virtual Methods in C#

added by Richard Carr
8/30/2013 9:13:05 PM

2 Kicks, 105 Views

Some scenarios require that virtual methods must be overridden in subclasses of a given type, an example being a requirement to override GetHashCode and Equals in data objects. This example describes how to enforce such overriding.


1 comments

tom103
10/11/2013 6:13:33 PM
I've been using C# for more than 10 years, and I had no idea that it was possible to declare "abstract override" methods... Thanks for the tip!