So - if there isn't particular reason why there isn't generic attributes,
I'm wondering - maybe they will be implemented?
Those would be great for ASP.NET MVC action filters.
So - if there isn't particular reason why there isn't generic attributes,
I'm wondering - maybe they will be implemented?
Those would be great for ASP.NET MVC action filters.
I haven't seen any evidence of this in the 4.0 spec... so I believe the answer is "no".
Shame, stumbled across a case where I wanted to use this in a ValidationAttribute.
Something that can check whether a given collection is empty. In general, this could be with a generic or non generic parameter.
public override Boolean IsValid(Object value)
{
var v = value as ICollection<T>;
return v.Count > 0;
}
Would be useful if I could do this.