Freigeben über


ITextSnapshot.GetLineFromPosition-Methode

Ruft für eine Zeile an der gegebenen Position eine ITextSnapshotLine ab.

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

Syntax

'Declaration
Function GetLineFromPosition ( _
    position As Integer _
) As ITextSnapshotLine
ITextSnapshotLine GetLineFromPosition(
    int position
)
ITextSnapshotLine^ GetLineFromPosition(
    int position
)
abstract GetLineFromPosition : 
        position:int -> ITextSnapshotLine
function GetLineFromPosition(
    position : int
) : ITextSnapshotLine

Parameter

  • position
    Typ: Int32

    Die Position.

Rückgabewert

Typ: Microsoft.VisualStudio.Text.ITextSnapshotLine
Eine ITextSnapshotLine, die nicht NULL ist.

Ausnahmen

Ausnahme Bedingung
ArgumentOutOfRangeException

position ist kleiner als Null oder größer als die Länge der Zeile.

.NET Framework-Sicherheit

Siehe auch

Referenz

ITextSnapshot Schnittstelle

Microsoft.VisualStudio.Text-Namespace