SessionStateItemCollection::Item Property (Int32)

 

Gets or sets a value in the collection by numerical index.

Namespace:   System.Web.SessionState
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.

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

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

.NET Framework
Available since 2.0
Return to top
Show: