Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SessionStateItemCollection::Item Property (String^)

 

Gets or sets a value in the collection by name.

Namespace:   System.Web.SessionState
Assembly:  System.Web (in System.Web.dll)

public:
property Object^ default[
	String^ name
] {
	virtual Object^ get(String^ name) sealed;
	virtual void set(String^ name, Object^ value) sealed;
}

Parameters

name
Type: System::String^

The key name of the value in the collection.

Property Value

Type: System::Object^

The value in the collection with the specified name. If the specified key is not found, attempting to get it returns null, and attempting to set it creates a new element using the specified key.

The following code example sets and gets values in a SessionStateItemCollection collection by name.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft