Class SourceCodeRange
Represents a human-readable source-code range for diagnostics, display, and tooling.
public sealed class SourceCodeRange : SourceCodeLocation
- Inheritance
-
SourceCodeRange
- Inherited Members
- Extension Methods
Remarks
This contract extends SourceCodeLocation with a display/diagnostic length, but intentionally carries no absolute source offset. It must not be treated as equivalent to SourceSpan, which is a runtime/source-buffer range contract.
Constructors
SourceCodeRange(string, int, int, int)
Initializes a new instance of the SourceCodeRange class.
public SourceCodeRange(string filePath, int line, int column, int length)
Parameters
filePathstringRequired source file path.
lineint1-based line number.
columnint1-based column number.
lengthintLength intended for display or diagnostics for the range.
Properties
Length
Gets the length intended for display or diagnostics for the range.
public int Length { get; }
Property Value
Methods
ToString()
public override string ToString()