This documentation is archived and is not being maintained.

HttpStaticObjectsCollection.Count Property

Gets the number of objects in the collection.

[Visual Basic]
Public Overridable ReadOnly Property Count As Integer  Implements _
   ICollection.Count
[C#]
public virtual int Count {get;}
[C++]
public: __property virtual int get_Count();
[JScript]
public function get Count() : int;

Property Value

The number of objects in the collection.

Implements

ICollection.Count

Example

The code in the following example executes only if the number of objects in the collection exceeds five.

[Visual Basic] 
If Application.StaticObjects.Count > 5 Then
   '...
End If
   

[C#] 
if (Application.StaticObjects.Count > 5)
{
   //...
}
   

[C++] 
if (Application->StaticObjects->Count > 5)
{
   //...
}
   

[JScript] 
if(Application.StaticObjects.Count > 5){
   //...
}
   

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpStaticObjectsCollection Class | HttpStaticObjectsCollection Members | System.Web Namespace

Show: