Enterprise Library--Validator.cs How Abstract Class having definition??

Posted by Soham on Stack Overflow See other posts from Stack Overflow or by Soham
Published on 2010-04-24T03:28:37Z Indexed on 2010/04/24 3:33 UTC
Read the original article Hit count: 250

Filed under:
|

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);
    }
}

TAKE a look at Validate() overload, how can an abstract class have definitions like this?

© Stack Overflow or respective owner

Related posts about c#

Related posts about enterprise-library