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

屬性值

集合中物品物件的數量。 預設值是 0。

範例

以下範例僅在集合中物件數超過五個時執行。

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

適用於