ObsoleteAttribute Constructors
Definition
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.
Overloads
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. |
ObsoleteAttribute()
- 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
ObsoleteAttribute(String)
- 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
ObsoleteAttribute(String, Boolean)
- 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
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기