Consider this piece of code:
public abstract class Validator
{
protected Validator()
{
}
protected abstract void ValidateCore(object instance, string value, IList<ValidationResult> results);
public void Validate(object instance, string value, IList<ValidationResult> results)
{
if (null == instance) throw new ArgumentNullException("instance");
if (null == results) throw new ArgumentNullException("results");
ValidateCore(instance, value, results);
}
}
Look at the Validate()
overload, how can an abstract class have definitions like this?