HttpApplicationState.Set(String, Object) 方法

定義

更新在 HttpApplicationState 集合中的物件值。Updates the value of an object in an HttpApplicationState collection.

public:
 void Set(System::String ^ name, System::Object ^ value);
public void Set (string name, object value);
member this.Set : string * obj -> unit
Public Sub Set (name As String, value As Object)

參數

name
String

更新的物件名稱。The name of the object to be updated.

value
Object

物件的更新值。The updated value of the object.

範例

下列範例會更新現有應用程式狀態變數的值。The following example updates the value of an existing application state variable.

Application.Set("MyAppVar1", MyNewObjectValue);

Application.Set("MyAppVar1", MyNewObjectValue)

適用於