共用方式為


TextRanges.Item 方法

傳回在 TextRanges 集合中的 TextRange 物件。

命名空間:  EnvDTE
組件:  EnvDTE (在 EnvDTE.dll 中)

語法

'宣告
Function Item ( _
    index As Object _
) As TextRange
TextRange Item(
    Object index
)
TextRange^ Item(
    [InAttribute] Object^ index
)
abstract Item : 
        index:Object -> TextRange 
function Item(
    index : Object
) : TextRange

參數

傳回值

型別:EnvDTE.TextRange
TextRange 物件。

備註

傳遞到 Index 的值,可為代表在 TextRanges 集合中之 TextRange 物件索引的整數,或是集合中的 TextRange 物件名稱。

如果集合無法找到對應於索引值的物件,Item 方法就會擲回 ArgumentException 例外狀況。

.NET Framework 安全性

請參閱

參考

TextRanges 介面

EnvDTE 命名空間

其他資源

HOW TO:編譯和執行 Automation 物件模型程式碼範例