Diagnostic.Severity 属性

定义

获取诊断的有效值 DiagnosticSeverity

public:
 abstract property Microsoft::CodeAnalysis::DiagnosticSeverity Severity { Microsoft::CodeAnalysis::DiagnosticSeverity get(); };
public abstract Microsoft.CodeAnalysis.DiagnosticSeverity Severity { get; }
member this.Severity : Microsoft.CodeAnalysis.DiagnosticSeverity
Public MustOverride ReadOnly Property Severity As DiagnosticSeverity

属性值

注解

若要获取诊断 DiagnosticDescriptor的默认严重性,请使用 DefaultSeverity。 若要确定这是被视为错误的警告,请使用 IsWarningAsError

适用于