HttpApplicationState.Get Method   
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets an HttpApplicationState object by name or index.
Overloads
| Get(Int32) | Gets an HttpApplicationState object by numerical index. | 
| Get(String) | Gets an HttpApplicationState object by name. | 
Get(Int32)
Gets an HttpApplicationState object by numerical index.
public:
 System::Object ^ Get(int index);public object Get(int index);member this.Get : int -> objPublic Function Get (index As Integer) As ObjectParameters
- index
- Int32
The index of the application state object.
Returns
The object referenced by index.
Examples
The following example returns the first object (index = 0) from the HttpApplicationState collection of the intrinsic Application object and copies it to a new object variable.
Object MyObject;
MyObject = Application.Get(0);
Dim MyObject As Object
MyObject = Application.Get(0)
Applies to
Get(String)
Gets an HttpApplicationState object by name.
public:
 System::Object ^ Get(System::String ^ name);public object Get(string name);member this.Get : string -> objPublic Function Get (name As String) As ObjectParameters
- name
- String
The name of the object.
Returns
The object referenced by name.
Remarks
The following example returns an object named MyAppVar1 from the HttpApplicationState collection of the intrinsic Application object and copies it to a new object variable.
Dim MyObject As Object  
MyObject = Application.Get("MyAppVar1")  
Object MyObject;  
MyObject = Application.Get("MyAppVar1");