This post originated from an RSS feed registered with .NET Buzz
by Eric Gunnerson.
Original Post: Conditional Attributes
Feed Title: Eric Gunnerson's C# Compendium
Feed URL: /msdnerror.htm?aspxerrorpath=/ericgu/Rss.aspx
Feed Description: Eric comments on C#, programming and dotnet in general, and the aerodynamic characteristics of the red-nosed flying squirrel of the Lesser Antilles
There's an extension to the conditional concept that shows up in Whidbey. It's not in Beta1 (well, to be more correct, it doesn't really work in beta 1), but it will be functional in beta2.
If you put a conditional attribute on an attribute definition, that instructs the compiler to only place that attribute in the assembly if the symbol is defined. This allows you to have "debug only" attributes that don't take up space in your release assemblies.