HttpCookieCollection.Item Property (Int32)

 

Gets the cookie with the specified numerical index from the cookie collection.

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

Public ReadOnly Property Item (
	index As Integer
) As HttpCookie

Parameters

index
Type: System.Int32

The index of the cookie to retrieve from the collection.

Property Value

Type: System.Web.HttpCookie

The HttpCookie specified by index.

The following example stores the name of the first cookie as a string variable (index = 0) in a cookie collection.

Dim CookieName As String = MyCookieCollection(0).Name

.NET Framework
Available since 1.1
Return to top
Show: