This documentation is archived and is not being maintained.

IHttpSessionState.Item Property (Int32)

Gets or sets a session-state item value by numerical index.

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

Object this[
	int index
] { get; set; }


Type: System.Int32
The numerical index of the session-state item value.

Property Value

Type: System.Object
The session-state item value specified in the index parameter.

The following code example implements the Item property of the IHttpSessionState interface to store and return an internal dictionary session-state item value by numeric index.

public object this[int index]
  get { return pSessionItems[index]; }
  set { pSessionItems[index] = value; }

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.