HttpStaticObjectsCollection.Count 属性

定义

获取集合中的对象数。Gets the number of objects in the collection.

public:
 property int Count { int get(); };
public int Count { get; }
member this.Count : int
Public ReadOnly Property Count As Integer

属性值

集合中的对象数。The number of objects in the collection.

实现

示例

以下示例中的代码仅在集合中的对象数超过5时才执行。The code in the following example executes only if the number of objects in the collection exceeds five.

if (Application.StaticObjects.Count > 5)
{
   //...
}
   
If Application.StaticObjects.Count > 5 Then
   '...
End If
   

适用于