共用方式為


ITextViewLineCollection.GetIndexOfTextLine Method

Gets the index in the text lines of the given text view line.

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

Syntax

'宣告
Function GetIndexOfTextLine ( _
    textLine As ITextViewLine _
) As Integer
int GetIndexOfTextLine(
    ITextViewLine textLine
)
int GetIndexOfTextLine(
    ITextViewLine^ textLine
)
abstract GetIndexOfTextLine : 
        textLine:ITextViewLine -> int 
function GetIndexOfTextLine(
    textLine : ITextViewLine
) : int

Parameters

Return Value

Type: System.Int32
The index of the ITextViewLine in \ view's TextViewLines list.

Exceptions

Exception Condition
ArgumentNullException

textLine is nulla null reference (Nothing in Visual Basic).

ObjectDisposedException

textLine has been disposed.

.NET Framework Security

See Also

Reference

ITextViewLineCollection Interface

Microsoft.VisualStudio.Text.Editor Namespace