Version

Diagnostic Constructor

Creates a new Diagnostic instance.
Syntax
'Declaration
 
Public Function New( _
   ByVal relativeSpan As TextSpan, _
   ByVal message As String, _
   Optional ByVal severity As DiagnosticSeverity _
)
public Diagnostic( 
   TextSpan relativeSpan,
   string message,
   DiagnosticSeverity severity
)

Parameters

relativeSpan
The span indicating the location of the diagnostic message relative to the SyntaxNode.FullSpan of the node to which it relates.
message
The message associated with the diagnostic message.
severity
The severity level of the diagnostic message.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionOccurs when message is null.
System.ArgumentExceptionOccurs when severity is not defined in the DiagnosticSeverity enumeration.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also