ITextSnapshot.GetLineFromLineNumber Method

Gets an ITextSnapshotLine for the given line number.

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

Syntax

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

Parameters

Return Value

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

Exceptions

Exception Condition
ArgumentOutOfRangeException

lineNumber is less than zero, or greater than or equal to the line count.

.NET Framework Security

See Also

Reference

ITextSnapshot Interface

Microsoft.VisualStudio.Text Namespace