In This Article

ITextSnapshotLineCollection Interface

Encapsulates a collection of ITextSnapshotLine objects.

public interface ITextSnapshotLineCollection : ICollection, IEnumerable

Properties

Item[Int32]

Gets the ITextSnapshotLine at the specified index.

[C#] In C#, this property is the indexer for the ITextSnapshotLineCollection class.

ITextSnapshotLine this[int index] { get; }
Parameter Type Description
index Int32

The index of the ITextSnapshotLine to return.

Property Value

ITextSnapshotLine:

The ITextSnapshotLine at the specified index.

Methods

GetLineTextRange(Int32)

Returns the TextRange of the specified line, excluding the line terminator.

TextRange GetLineTextRange(int index)
Parameter Type Description
index Int32

The index of the line to examine.

Returns

TextRange:

The TextRange of the specified line, excluding the line terminator.

IndexOf(Int32)

Finds the index of the ITextSnapshotLine that contains the specified offset.

int IndexOf(int offset)
Parameter Type Description
offset Int32

The offset to look for.

Returns

Int32:

The index of the ITextSnapshotLine that contains the specified offset.

See Also