ObsoleteAttribute.DiagnosticId 屬性

定義

取得或設定報告使用 API 時,編譯器所用的識別碼。

public:
 property System::String ^ DiagnosticId { System::String ^ get(); void set(System::String ^ value); };
public string? DiagnosticId { get; set; }
member this.DiagnosticId : string with get, set
Public Property DiagnosticId As String

屬性值

唯一的診斷識別碼。

備註

診斷識別碼會顯示在警告和錯誤的組建輸出中。

此屬性代表唯一識別碼,可用來視需要隱藏警告或錯誤。

選擇適當的診斷識別碼 ,使其是唯一的。

適用於