Freigeben über


ITextSnapshotLine Interface

Represents a line of text from an ITextSnapshot.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

Syntax

'Declaration
Public Interface ITextSnapshotLine
public interface ITextSnapshotLine
public interface class ITextSnapshotLine
type ITextSnapshotLine =  interface end
public interface ITextSnapshotLine

The ITextSnapshotLine type exposes the following members.

Properties

  Name Description
Public property End Gets the SnapshotPoint of the first character past the end of the line, excluding any line break characters.
Public property EndIncludingLineBreak The SnapshotPoint of the first character past the end of the line, including any line break characters.
Public property Extent Gets the extent of the line, excluding any line break characters.
Public property ExtentIncludingLineBreak Gets the extent of the line, including any line break characters.
Public property Length Gets the length of the line, excluding any line break characters.
Public property LengthIncludingLineBreak Gets the length of the line, including any line break characters.
Public property LineBreakLength Gets the length of line break characters (always falls in the range [0..2]).
Public property LineNumber Gets the 0-based line number of the line.
Public property Snapshot Gets the ITextSnapshot in which the line appears.
Public property Start Gets the SnapshotPoint of the first character in the line.

Top

Methods

  Name Description
Public method GetLineBreakText Gets the string consisting of the line break characters (if any) at the end of the line.
Public method GetText Gets the text of the line, excluding any line break characters.
Public method GetTextIncludingLineBreak Gets the text of the line, including any line break characters.

Top

Remarks

For more information about text snapshot lines, see the section "A Closer Look at the Text Model and the Text View" in Inside the Editor.

This object is immutable.

See Also

Reference

Microsoft.VisualStudio.Text Namespace