ObsoleteAttribute Class
Marks the program elements that are no longer in use. This class cannot be inherited.
For a list of all members of this type, see ObsoleteAttribute Members.
System.Object
System.Attribute
System.ObsoleteAttribute
[Visual Basic] <AttributeUsage(AttributeTargets.Class Or AttributeTargets.Struct _ Or AttributeTargets.Enum Or AttributeTargets.Constructor Or _ AttributeTargets.Method Or AttributeTargets.Property Or _ AttributeTargets.Field Or AttributeTargets.Event Or _ AttributeTargets.Interface Or AttributeTargets.Delegate)> <Serializable> NotInheritable Public Class ObsoleteAttribute Inherits Attribute [C#] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate)] [Serializable] public sealed class ObsoleteAttribute : Attribute [C++] [AttributeUsage(AttributeTargets::Class | AttributeTargets::Struct | AttributeTargets::Enum | AttributeTargets::Constructor | AttributeTargets::Method | AttributeTargets::Property | AttributeTargets::Field | AttributeTargets::Event | AttributeTargets::Interface | AttributeTargets::Delegate)] [Serializable] public __gc __sealed class ObsoleteAttribute : public Attribute [JScript] public AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate) Serializable class ObsoleteAttribute 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
ObsoleteAttribute is applicable to all program elements except assemblies, modules, parameters or return values. Marking an element as obsolete informs the users that the element will be removed in future versions of the product.
For more information about using attributes, see Extending Metadata Using Attributes.
Requirements
Namespace: System
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
Assembly: Mscorlib (in Mscorlib.dll)
See Also
ObsoleteAttribute Members | System Namespace | Attribute | Extending Metadata Using Attributes