ObsoleteAttribute Constructors
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the ObsoleteAttribute class.
ObsoleteAttribute() |
Initializes a new instance of the ObsoleteAttribute class with default properties. |
ObsoleteAttribute(String) |
Initializes a new instance of the ObsoleteAttribute class with a specified workaround message. |
ObsoleteAttribute(String, Boolean) |
Initializes a new instance of the ObsoleteAttribute class with a workaround message and a Boolean value indicating whether the obsolete element usage is considered an error. |
- Source:
- ObsoleteAttribute.cs
- Source:
- ObsoleteAttribute.cs
- Source:
- ObsoleteAttribute.cs
Initializes a new instance of the ObsoleteAttribute class with default properties.
public:
ObsoleteAttribute();
public ObsoleteAttribute();
Public Sub New ()
Remarks
The following table shows the initial property values for an instance of ObsoleteAttribute.
Property | Value |
---|---|
IsError | false |
Message | null |
DiagnosticId | null |
UrlFormat | null |
Applies to
.NET 10 ja muud versioonid
Toode | Versioonid |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.1 |
UWP | 10.0 |
- Source:
- ObsoleteAttribute.cs
- Source:
- ObsoleteAttribute.cs
- Source:
- ObsoleteAttribute.cs
Initializes a new instance of the ObsoleteAttribute class with a specified workaround message.
public:
ObsoleteAttribute(System::String ^ message);
public ObsoleteAttribute(string message);
public ObsoleteAttribute(string? message);
new ObsoleteAttribute : string -> ObsoleteAttribute
Public Sub New (message As String)
Parameters
- message
- String
The text string that describes alternative workarounds.
Remarks
The following table shows the initial property values for an instance of ObsoleteAttribute.
Property | Value |
---|---|
IsError | false . |
Message | The workaround message. |
DiagnosticId | null . |
UrlFormat | null . |
Applies to
.NET 10 ja muud versioonid
Toode | Versioonid |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.1 |
UWP | 10.0 |
- Source:
- ObsoleteAttribute.cs
- Source:
- ObsoleteAttribute.cs
- Source:
- ObsoleteAttribute.cs
Initializes a new instance of the ObsoleteAttribute class with a workaround message and a Boolean value indicating whether the obsolete element usage is considered an error.
public:
ObsoleteAttribute(System::String ^ message, bool error);
public ObsoleteAttribute(string message, bool error);
public ObsoleteAttribute(string? message, bool error);
new ObsoleteAttribute : string * bool -> ObsoleteAttribute
Public Sub New (message As String, error As Boolean)
Parameters
- message
- String
The text string that describes alternative workarounds.
- error
- Boolean
true
if the obsolete element usage generates a compiler error; false
if it generates a compiler warning.
Remarks
The following table shows the initial property values for an instance of ObsoleteAttribute.
Property | Value |
---|---|
IsError | The error value. |
Message | The message value. |
DiagnosticId | null . |
UrlFormat | null . |
Applies to
.NET 10 ja muud versioonid
Toode | Versioonid |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.1 |
UWP | 10.0 |
Toote „.NET“ tagasiside
.NET on avatud lähtekoodiga projekt. Tagasiside andmiseks valige link: