Gets a Boolean value indicating whether the compiler will treat usage of the obsolete program element as an error.
Assembly: mscorlib (in mscorlib.dll)
The following example defines a class that contains two members marked as obsolete. The first, a property named OldProperty, produces a compiler warning if it is called. The second, a method named CallOldMethod, produces a compiler error. The example uses reflection to get information about the ObsoleteAttribute attributes applied to members of the type and displays the values of their Message and properties.
Available since 8
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 8.1