HttpApplicationStateWrapper.Get Method

Definition

Gets a state object by name or index.

Overloads

Get(Int32)

Returns a state object by index.

Get(String)

Returns a state object by name.

Get(Int32)

Returns a state object by index.

C#
public override object Get(int index);

Parameters

index
Int32

The index of the application state object to get.

Returns

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

Get(String)

Returns a state object by name.

C#
public override object Get(string name);

Parameters

name
String

The name of the object to get.

Returns

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