获取访问值所需的索引数目。
命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)
语法
声明
ReadOnly Property NumIndices As Short
    Get
short NumIndices { get; }
property short NumIndices {
    short get ();
}
abstract NumIndices : int16
function get NumIndices () : short
属性值
类型:System.Int16
一个短整型值,表示访问值所需的索引数目。
备注
IndexedValue 的有效参数的值范围是从 1 到 NumIndices 属性的返回值,包括这两个值。
示例
' Visual Studio macro.
Sub NumIndicesExample()
   Dim Props As Properties
   Dim PropObj As [Property]
   Dim NameValPair As String
        
   Props = DTE.Properties("Environment", "General")
   MsgBox("Tools – Options – Environment – General Properties Count _
   = " & Props.Count())
   For Each PropObj In Props
     NameValPair = NameValPair & (PropObj.Name & "Value = " & _
     PropObj.Value & microsoft.VisualBasic.ControlChars.CrLf)
   Next
   MsgBox(NameValPair)
   MsgBox("NumIndices value: " & PropObj.NumIndices)
End Sub
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。