Redigera

Dela via


IHttpSessionState.Clear Method

Definition

Clears all values from the session-state item collection.

public:
 void Clear();
public void Clear ();
abstract member Clear : unit -> unit
Public Sub Clear ()

Examples

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();
}
Public Sub Clear() Implements IHttpSessionState.Clear 
  pSessionItems.Clear()
End Sub

Public Sub RemoveAll() Implements IHttpSessionState.RemoveAll
    Clear()
End Sub

Remarks

Clear performs the same function as RemoveAll.

Applies to

See also