Possible Duplicate:
Custom Compiler WarningsDuplicate: Custom Compiler Warnings
I’m new to writing my own Attributes for .NET, but would like to write one that behaves similarly to the System.ObsoleteAttribute attribute–if a class/member is tagged with the attribute I would like any caller of that class/member to generate a warning.
Specifically I’d like to create an [Unimplemented] attribute–and in practice use it during development rather than throwing NotImplementedExceptions.
Does anyone know how to have the IDE evaluate it in real-time and generate a warning if an [Unimplemented] item is called?
Attributes don’t actually do anything, they basically just tag the method (or class or whatever) with some metadata. It is the IDE/compiler that does the processing to decide what to do when it sees the Obsolete attribute.
If you wanted visual studio to behave in this way for another attribute, you would have to write a custom plug-in for visual studio.