HttpApplicationStateWrapper.Item[] Property

Definition

Gets an object in an HttpApplicationState collection by name or index.

Overloads

Item[Int32]

Gets a state object by index.

Item[String]

Gets a state object by name.

Item[Int32]

Gets a state object by index.

C#
public override object this[int index] { get; }

Parameters

index
Int32

The index of the object in the collection.

Property Value

The object referenced by index.

Exceptions

index is outside the valid range of indexes for the collection.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Item[String]

Gets a state object by name.

C#
public override object this[string name] { get; set; }

Parameters

name
String

The name of the object in the collection.

Property Value

The object referenced by name, if found; otherwise, null.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1