System.Web Namespace HttpApplicationState Class
Gets the value of a single HttpApplicationState object by name.
In [ C# ], this property is the indexer for the HttpApplicationState class.
[ VB ]
Overloads Public Default Property Item ( _
ByVal name As String _
) As Object
[ C# ]
public object this [
string name
] {get; set;}
[ C++ ]
public: __property Object* get_Item (
String* name
);
public: __property void set_Item (
String* name,
Object*
);
[ JScript ]
returnValue = HttpApplicationStateObject.Item ( name );
HttpApplicationStateObject.Item ( name ) = returnValue;
-or-
returnValue = HttpApplicationStateObject ( name );
HttpApplicationStateObject ( name ) = returnValue;
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.
- name
- The name of the object in the collection.
- name
- The name of the object in the collection.
The object referenced by name.
The following example returns an object named myAppVar from the HttpApplicationState collection and assigns it as the value of a new object variable named myObject.
Object myObject = Application [ "myAppVar" ];
Dim myObject As Object = Application ( "myAppVar" )
var myObject : Object = Application [ "myAppVar" ]; |
|
C# |
VB |
JScript |
HttpApplicationState Members HttpApplicationState.Item Overload List