August 2003
Intermediate to advanced
928 pages
32h 1m
English
ConditionalAttribute
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; }
}
System.Object
→
System.Attribute
→
ConditionalAttribute
Method

Figure 29-1. Process, EventLog, and related classes