HttpApplicationState.Contents 属性

定义

获取对 HttpApplicationState 对象的引用。

public:
 property System::Web::HttpApplicationState ^ Contents { System::Web::HttpApplicationState ^ get(); };
public System.Web.HttpApplicationState Contents { get; }
member this.Contents : System.Web.HttpApplicationState
Public ReadOnly Property Contents As HttpApplicationState

属性值

HttpApplicationState

HttpApplicationState 对象的引用。

示例

以下示例创建一个新 HttpApplicationState 对象,该对象用于访问应用程序状态集合中的对象名称。


HttpApplicationState AppState2;

AppState2 = Application.Contents;

String[] StateVars = new String[AppState2.Count];
StateVars = AppState2.AllKeys;
Dim AppState2 As HttpApplicationState
 
AppState2 = Application.Contents
 
Dim StateVars(AppState2.Count) As String
StateVars = AppState2.AllKeys

注解

此属性提供与早期版本的 ASP 的兼容性。

适用于