共用方式為


ITextViewLineCollection.GetIndexOfTextLine 方法

取得指定文字檢視行之文字行中的索引。

命名空間:  Microsoft.VisualStudio.Text.Editor
組件:  Microsoft.VisualStudio.Text.UI (在 Microsoft.VisualStudio.Text.UI.dll 中)

語法

'宣告
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

參數

傳回值

類型:Int32
索引ITextViewLine在 \ 檢視表的TextViewLines清單。

例外狀況

例外狀況 條件
ArgumentNullException

textLine 為 nullnull 參考 (即 Visual Basic 中的 Nothing)。

ObjectDisposedException

textLine 已經處置。

.NET Framework 安全性

請參閱

參考

ITextViewLineCollection 介面

Microsoft.VisualStudio.Text.Editor 命名空間