HttpApplicationState.Add-Methode
Fügt der HttpApplicationState-Auflistung ein neues Objekt hinzu.
Namespace: System.Web
Assembly: System.Web (in system.web.dll)
Syntax
'Declaration
Public Sub Add ( _
name As String, _
value As Object _
)
'Usage
Dim instance As HttpApplicationState
Dim name As String
Dim value As Object
instance.Add(name, value)
public void Add (
string name,
Object value
)
public:
void Add (
String^ name,
Object^ value
)
public void Add (
String name,
Object value
)
public function Add (
name : String,
value : Object
)
Parameter
- name
Der Name des Objekts, das der Auflistung hinzugefügt werden soll.
- value
Der Wert des Objekts.
Beispiel
Im folgenden Beispiel werden die zwei Anwendungsvariablen MyAppVar1 und MyAppVar2 der Application-Auflistung hinzugefügt.
Application.Add("MyAppVar1", MyObject1)
Application.Add("MyAppVar2", MyObject2)
Application.Add("MyAppVar1", MyObject1);
Application.Add("MyAppVar2", MyObject2);
get_Application().Add("MyAppVar1", myObject1);
get_Application().Add("MyAppVar2", myObject2);
Application.Add("MyAppVar1", MyObject1)
Application.Add("MyAppVar2", MyObject2)
Plattformen
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
HttpApplicationState-Klasse
HttpApplicationState-Member
System.Web-Namespace