System.Net.CookieContainer.GetCookies Method

Gets a System.Net.CookieCollection that contains the System.Net.Cookie instances that are associated with a specific URI.

Syntax

public CookieCollection GetCookies (Uri uri)

Parameters

uri
The URI of the System.Net.Cookie instances desired.

Returns

A System.Net.CookieCollection that contains the System.Net.Cookie instances that are associated with a specific URI.

Remarks

A new instance of a System.Net.CookieCollection is created. Then the System.Net.Cookie instances in the internal collection that are associated with the specified URI are read out and added to the new System.Net.CookieCollection.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0