HttpApplicationState.Count 屬性

定義

取得 HttpApplicationState 集合中的物件數目。

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

屬性值

Int32

集合中項目物件的數目。 預設值是 0。

範例

只有當集合中的物件數目超過五時,下列範例才會執行。

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

適用於