Imports.Count 属性

更新:2007 年 11 月

获取一个值,该值指示集合中对象的数目。只读。

命名空间:  VSLangProj
程序集:  VSLangProj(在 VSLangProj.dll 中)

语法

声明
ReadOnly Property Count As Integer
用法
Dim instance As Imports
Dim value As Integer

value = instance.Count
int Count { get; }
property int Count {
    int get ();
}
function get Count () : int

属性值

类型:System.Int32

集合中的对象数。

示例

' Macro Editor
' This method creates string with a list of all the references
' by index in a References collection.
Imports VSLangProj
Function ListReferences(ByVal refs As References) _
   As String
   Dim i As Integer
   Dim list As String = ""
   For i = 1 To refs.Count
      list &= i.ToString() & " " & refs.Item(i).Identity & " " & _
         ControlChars.CrLf 
   Next
   Return list
End Function

权限

另请参见

参考

Imports 接口

Imports 成员

VSLangProj 命名空间