SessionStateItemCollection::Item Property (Int32)
.NET Framework (current version)
Gets or sets a value in the collection by numerical index.
Assembly: System.Web (in System.Web.dll)
public: property Object^ default[ int index ] { virtual Object^ get(int index) sealed; virtual void set(int index, Object^ value) sealed; }
Parameters
- index
-
Type:
System::Int32
The numerical index of the value in the collection.
Property Value
Type: System::Object^The value in the collection stored at the specified index. 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.
Implements
ISessionStateItemCollection::Item[Int32]The following code example sets and gets values in a SessionStateItemCollection collection by numerical index.
.NET Framework
Available since 2.0
Available since 2.0
Show: