If I have the following generic interface:
public interface IValidator<T>
{
Boolean IsValid(T entity_);
}
Can I use it in the following manner? Is this against Object Oriented Programming guidelines?
public PathValidator : IValidator<String>
{
}
No, this is fine and common (assuming that your interface is not empty and has a method signature like
bool IsValid(T entity)).What makes you think it should be? If you let us know, we can elaborate.