SessionStateItemCollection::Item Property (String^)
.NET Framework (current version)
Gets or sets a value in the collection by name.
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.
.NET Framework
Available since 2.0
Available since 2.0
Show: