Class ConditionalAttribute
- Namespace
- System.Diagnostics
- Assembly
- mscorlib.dll
Indicates to compilers that a method call or attribute should be ignored unless a specified conditional compilation symbol is defined.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class ConditionalAttribute : Attribute
- Inheritance
-
ConditionalAttribute
- Inherited Members
- Extension Methods
Constructors
ConditionalAttribute(string)
Initializes a new instance of the ConditionalAttribute class.
public ConditionalAttribute(string conditionString)
Parameters
conditionString
stringA string that specifies the case-sensitive conditional compilation symbol that is associated with the attribute.
Properties
ConditionString
Gets the conditional compilation symbol that is associated with the ConditionalAttribute attribute.
public string ConditionString { get; }
Property Value
- string
A string that specifies the case-sensitive conditional compilation symbol that is associated with the ConditionalAttribute attribute.