Export (0) Print
Expand All

DiscardableAttribute Class

Marks a type definition as discardable.

For a list of all members of this type, see DiscardableAttribute Members.

System.Object
   System.Attribute
      System.Runtime.CompilerServices.DiscardableAttribute

[Visual Basic]
Public Class DiscardableAttribute
   Inherits Attribute
[C#]
public class DiscardableAttribute : Attribute
[C++]
public __gc class DiscardableAttribute : public Attribute
[JScript]
public class DiscardableAttribute extends Attribute

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Mscorlib (in Mscorlib.dll)

See Also

DiscardableAttribute Members | System.Runtime.CompilerServices Namespace

Show:
© 2014 Microsoft