Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Count Property

IHttpSessionState.Count Property

Gets the number of items in the session-state item collection.

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

int Count { get; }

Property Value

Type: System.Int32
The number of items in the session-state item collection.

The following code example implements the Count property of the IHttpSessionState interface to return the number of items in the internal session-state item collection.

public int Count
{
  get { return pSessionItems.Count; }
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft