Share via


ITextViewLineCollection.GetTextViewLineContainingBufferPosition Method

Gets the ITextViewLine that contains the specified text buffer position.

Namespace:  Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)

Syntax

'Declaration
Function GetTextViewLineContainingBufferPosition ( _
    bufferPosition As SnapshotPoint _
) As ITextViewLine
ITextViewLine GetTextViewLineContainingBufferPosition(
    SnapshotPoint bufferPosition
)
ITextViewLine^ GetTextViewLineContainingBufferPosition(
    SnapshotPoint bufferPosition
)
abstract GetTextViewLineContainingBufferPosition : 
        bufferPosition:SnapshotPoint -> ITextViewLine
function GetTextViewLineContainingBufferPosition(
    bufferPosition : SnapshotPoint
) : ITextViewLine

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.Formatting.ITextViewLine
An ITextViewLine that contains the position, or nulla null reference (Nothing in Visual Basic) if none exists.

Exceptions

Exception Condition
ArgumentOutOfRangeException

bufferPosition is not a valid buffer position.

.NET Framework Security

See Also

Reference

ITextViewLineCollection Interface

Microsoft.VisualStudio.Text.Editor Namespace