Answer the question
In order to leave comments, you need to log in
How to say in C# that a base class virtual method must be overridden?
How in the base class to say that its virtual method, when inherited, is required to be overridden?
To display an error during development if the method is not explicitly overridden in an inherited class.
public class _BaseClass
{
public virtual void __Save() { throw new NotImplementedException(); }
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question