Is there an analogous conditional-not-present attribute or maybe a way to use the Conditional attribute to only include a method if that symbol is not defined?
What I'm looking for is something that works like this:
[Conditional("!SILVERLIGHT")]
private void DoStuffThatSilverlightCant() {...}
Such that the method will not be included if the symbol SILVERLIGHT
does exist.
The reason I don't want to use a simple #ifdef
is so that I can take advantage of the compiler removing the calling statements without having to wrap every individual call in an #ifdef
.