This documentation is archived and is not being maintained.

HttpApplicationState.Count Property

Gets the number of objects in the HttpApplicationState collection.

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

Property Value

The number of item objects in the collection. The default is 0.

Implements

ICollection.Count

Example

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

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

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

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

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

Requirements

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

See Also

HttpApplicationState Class | HttpApplicationState Members | System.Web Namespace

Show: