This documentation is archived and is not being maintained.
HttpApplicationState.Item Property
.NET Framework 1.1
Gets access to an object in an HttpApplicationState collection. This property is overloaded to allow access to an object by name or numerical index.
[C#] In C#, this property is the indexer for the HttpApplicationState class.
Overload List
Gets the value of a single HttpApplicationState object by name.
[Visual Basic] Overloads Public Default Property Item(String) As Object
[C#] public object this[string] {get; set;}
[C++] public: __property Object* get_Item(String*);
public: __property void set_Item(String*, Object*);
[JScript] HttpApplicationState.Item (String)
Gets a single HttpApplicationState object by index.
[Visual Basic] Overloads Public Default ReadOnly Property Item(Integer) As Object
[C#] public object this[int] {get;}
[C++] public: __property Object* get_Item(int);
[JScript] HttpApplicationState.Item (int)
Example
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.
[Visual Basic] Dim MyObject As Object MyObject = Application(0) [C#] Object MyObject; MyObject = Application[0]; [C++] Object* MyObject; MyObject = Application->Item[0]; [JScript] var myObject : Object myObject = Application[0]
See Also
HttpApplicationState Class | HttpApplicationState Members | System.Web Namespace
Show: