Class ConditionalAttribute
Indicates to compilers that a method call or attribute should be ignored unless a specified conditional compilation symbol is defined.
Inherited Members
Namespace: System.Diagnostics
Assembly: mscorlib.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class ConditionalAttribute : Attribute
Constructors
ConditionalAttribute(string)
Initializes a new instance of the ConditionalAttribute class.
Declaration
public ConditionalAttribute(string conditionString)
Parameters
Type | Name | Description |
---|---|---|
string | conditionString | A 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.
Declaration
public string ConditionString { get; }
Property Value
Type | Description |
---|---|
string | A string that specifies the case-sensitive conditional compilation symbol that is associated with the ConditionalAttribute attribute. |