Table of Contents

Class IndexedFileLineChar

Namespace
Hi.Common.FileLines
Assembly
HiGeom.dll

Represents a character-level position within a file, with associated file path context. Analogous to IndexedFileLine but at character granularity.

public class IndexedFileLineChar : IFileLineCharIndex, IFileLineIndex, IGetFileLineIndex, IEquatable<IndexedFileLineChar>
Inheritance
IndexedFileLineChar
Implements
Inherited Members
Extension Methods

Constructors

IndexedFileLineChar()

Initializes a new instance of the IndexedFileLineChar class.

public IndexedFileLineChar()

IndexedFileLineChar(IndexedFileLine, int)

Creates an IndexedFileLineChar from an IndexedFileLine at the specified character index.

public IndexedFileLineChar(IndexedFileLine src, int charIndex)

Parameters

src IndexedFileLine

The source indexed file line.

charIndex int

The zero-based character index within the line.

IndexedFileLineChar(IndexedFileLineChar)

Initializes a new instance of the IndexedFileLineChar class by copying another instance.

public IndexedFileLineChar(IndexedFileLineChar src)

Parameters

src IndexedFileLineChar

The source to copy from.

IndexedFileLineChar(int, string, int, int)

Initializes a new instance of the IndexedFileLineChar class with specified values.

public IndexedFileLineChar(int fileIndex, string filePath, int lineIndex, int charIndex)

Parameters

fileIndex int

The zero-based file index.

filePath string

The file path.

lineIndex int

The zero-based line index.

charIndex int

The zero-based character index within the line.

Properties

CharIndex

Character index within the line. 0-based.

public int CharIndex { get; set; }

Property Value

int

FileIndex

File Index. Start on 0.

public int FileIndex { get; set; }

Property Value

int

FilePath

File path.

public string FilePath { get; set; }

Property Value

string

LineIndex

Line Index. Start on 0.

public int LineIndex { get; set; }

Property Value

int

Methods

Equals(IndexedFileLineChar)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(IndexedFileLineChar other)

Parameters

other IndexedFileLineChar

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetFileLineIndex()

public FileLineIndex GetFileLineIndex()

Returns

FileLineIndex

FileLineIndex

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToFileLineCharIndex()

Converts to a FileLineCharIndex (without file path context).

public FileLineCharIndex ToFileLineCharIndex()

Returns

FileLineCharIndex

ToHumanString()

Returns a human-readable string representation.

public string ToHumanString()

Returns

string

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.