[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Indicates to compilers that a method call or attribute should be ignored unless a specified conditional compilation symbol is defined.
Assembly: mscorlib (in mscorlib.dll)
Thetype exposes the following members.
|Equals(Object)||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
You can apply the attribute to methods and classes. However, its use on classes is valid only for types that are derived from Attribute. either will be ignored or will produce a compiler warning or error message if you apply it to any other type.
Applying to a method indicates to compilers that a call to the method should not be compiled into Microsoft intermediate language (MSIL) unless the conditional compilation symbol that is associated with is defined. Applying to an attribute indicates that the attribute should not be emitted to metadata unless the conditional compilation symbol is defined. Any arguments passed to the method or attribute are still type-checked by the compiler.
is applied to the methods that are defined in the and classes.