Thursday, June 3, 2010

One feature I wish .NET offered

Know one thing that pisses me off about .NET? That you can't write design-time/compile-time exceptions, e.g. for custom attribute classes that need to verify design-time things like (1) existence of input parameter of certain name/type, (2) existence of other required attributes, etc.

Microsoft has obviously accounted for this in some way for their own attributes, e.g. AttributeUsageAttribute, but don't seem to offer any overridable method in order to provide our own design-time/compile-time errors.