IHttpSessionState.Clear Method ()

 
System_CAPS_noteNote

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

Clears all values from the session-state item collection.

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

void Clear()

Clear performs the same function as RemoveAll.

The following code example implements the Clear method of the IHttpSessionState interface to delete all items from an internal session-state item collection.

public void Clear()
{
  pSessionItems.Clear();
}

public void RemoveAll()
{
    Clear();
}

.NET Framework
Available since 2.0
Return to top
Show: