System.Web Namespace HttpApplicationState Class
Gets a single HttpApplicationState object by index.
In [ C# ], this property is the indexer for the HttpApplicationState class.
[ VB ]
Overloads Public Default ReadOnly Property Item ( _
ByVal index As Integer _
) As Object
[ C# ]
public object this [
int index
] {get;}
[ C++ ]
public: __property Object* get_Item (
int index
);
[ JScript ]
returnValue = HttpApplicationStateObject.Item ( index );
-or-
returnValue = HttpApplicationStateObject ( index );
In [ JScript ], you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.
- index
- The numerical index of the object in the collection.
- index
- The numerical index of the object in the collection.
The object referenced by index.
The following example returns the first object ( index = 0 ) from the HttpApplicationState collection and assigns it as the value of a new object variable named myObject.
Object myObject = Application [ 0 ];
Dim myObject As Object = Application ( 0 )
var myObject : Object = Application [ 0 ]; |
|
C# |
VB |
JScript |
HttpApplicationState Members HttpApplicationState.Item Overload List