Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Class

ObsoleteAttribute

class ObsoleteAttribute

Module: System
Assembly: System.Runtime.dll
Source file: ObsoleteAttribute.rvn

Inheritance: Object → Attribute → ObsoleteAttribute

Marks a declaration as obsolete without removing it from the runtime contract. Compilers report a warning by default, or an error when IsError is true.

Constructors

3 items
ObsoleteAttribute() Creates an obsolete warning with no explanatory message.
ObsoleteAttribute(message: string?, error: bool) Creates an obsolete warning or error with the supplied migration message.
ObsoleteAttribute(message: string?) Creates an obsolete warning with the supplied migration message.

Properties

2 items
IsError: bool Gets whether a compiler must reject use instead of reporting a warning.
Message: string? Gets the migration message, or null when none was supplied.

Methods

4 items
Equals(other: object?) -> bool Tests reference identity by default; an ordinary class may override equality. Inherited from Object.Equals
GetHashCode() -> int Returns a stable identity hash by default; an ordinary class may override it consistently with equality. Inherited from Object.GetHashCode
GetType() -> TypeInfo Returns metadata for the concrete runtime type of this instance. Inherited from Object.GetType
ToString() -> string Returns the concrete runtime type name for supported references, or display text from a class or boxed-struct override. Inherited from Object.ToString