System.Runtime.CompilerServices.DiscardableAttribute Class

Marks a type definition as discardable.

See Also: DiscardableAttribute Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public class DiscardableAttribute : Attribute

Remarks

A type definition might be marked discardable if it is not referenced by any other code in its assembly. This might be useful for languages that support separate compilation, where it is only at link phase that it becomes known whether any type is actually referenced by other code.

The classes in System.Runtime.CompilerServices are for compiler writers' use only.

Requirements

Namespace: System.Runtime.CompilerServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0