ITextSnapshot.GetLineFromPosition Method

Gets an ITextSnapshotLine for a line at the given position.

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

Syntax

声明
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

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.ITextSnapshotLine
A non-null ITextSnapshotLine.

Exceptions

Exception Condition
ArgumentOutOfRangeException

position is less than zero or greater than the length of the line.

.NET Framework Security

See Also

Reference

ITextSnapshot Interface

Microsoft.VisualStudio.Text Namespace