ConditionalAttribute

ConditionalAttribute CF 1.0, ECMA 1.0, serializable

System.Diagnostics (mscorlib.dll) sealed class

This attribute marks a method as callable only if a compilation variable, given by conditionString , is set. Compilation variables can be set by supplying /define:VARIABLE as a command-line argument to the compiler or by supplying #define VARIABLE directives in the source code itself. If the compilation variable is not set, calls to the marked method are ignored.

 public sealed class  ConditionalAttribute  : Attribute {  // Public Constructors  public  ConditionalAttribute  (string   conditionString   );  // Public Instance Properties  public string  ConditionString  {get; } } 

Hierarchy

System.Object System.Attribute ConditionalAttribute

Valid On

Method

Figure 29-1. Process, EventLog, and related classes
figs/csn2_2901.gif


C# in a Nutshell
C # in a Nutshell, Second Edition
ISBN: 0596005261
EAN: 2147483647
Year: 2005
Pages: 963

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net