次の方法で共有


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