DiagnosticMessage Class

A diagnostic message with errors.

public class DiagnosticMessage

Constructors

NameDescription
DiagnosticMessage(DiagnosticMessageKind, SourceSpan, string)Creates a new instance of a DiagnosticMessage

DiagnosticMessage(DiagnosticMessageKind, SourceSpan, string)

DiagnosticMessage.cs

Creates a new instance of a DiagnosticMessage

public DiagnosticMessage(DiagnosticMessageKind kind, SourceSpan span, string message)

Parameters

kind DiagnosticMessageKind
The kind of message
span SourceSpan
The source span
message string
The message

Properties

NameDescription
KindGets the kind of message.
MessageGets the message.
SpanGets the source span.

Gets the kind of message.

public DiagnosticMessageKind Kind { get; }

Property value

DiagnosticMessageKind

Gets the message.

public string Message { get; }

Property value

string

Gets the source span.

public SourceSpan Span { get; }

Property value

SourceSpan

Methods

NameDescription
ToString()Returns a string that represents the current object.

Returns a string that represents the current object.

public override string ToString()

Returns

string A string that represents the current object.