IHttpSessionState.GetEnumerator Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns an enumerator that can be used to read all the session-state item values in the current session.

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

IEnumerator GetEnumerator()

Return Value

Type: System.Collections.IEnumerator

An IEnumerator that can iterate through the values in the session-state item collection.

The following code example implements the GetEnumerator method of the IHttpSessionState interface to return an enumerator for the internal session-state item collection.

public IEnumerator GetEnumerator()
  return pSessionItems.GetEnumerator();

.NET Framework
Available since 2.0
Return to top