CodeDiagnostic

References
public sealed class CodeDiagnostic
Represents a single message generated by the compiler.

Properties

Column

#
Gets the column index of the first offending character, if available. This property will yield -1 if no column is known.
public int Column { get; }

Description

#
Gets the description of the diagnostic.
public string Description { get; }

IsError

#
Gets whether this diagnostic qualifies as an error.
public bool IsError { get; }

IsWarning

#
Gets whether this diagnostic qualifies as a warning.
public bool IsWarning { get; }

Length

#
Length of code implicated.
public int Length { get; }

Line

#
Gets the line number of the first offending character, if available. This property will yield -1 if no line number is known.
public int Line { get; }

Location

#
Index of first character of implicated code.
public int Location { get; }

Methods

CreateError

#
Create a new error.
public static CodeDiagnostic CreateError(
description,
Description.
location,
Beginning of implicated code.
length,
Length of implicated code.
line = -1,
Line number, if known.
column = -1
Column index, if known.
)

CreateHint

#
Create a new hint or informational message.
public static CodeDiagnostic CreateHint(
description,
Description.
location,
Beginning of implicated code.
length,
Length of implicated code.
line = -1,
Line number, if known.
column = -1
Column index, if known.
)

CreateWarning

#
Create a new warning.
public static CodeDiagnostic CreateWarning(
description,
Description.
location,
Beginning of implicated code.
length,
Length of implicated code.
line = -1,
Line number, if known.
column = -1
Column index, if known.
)