Export (0) Print
Expand All

CookieContainer.GetCookies Method

Gets A CookieCollection containing the Cookie instances associated with a specific URI.

[Visual Basic]
Public Function GetCookies( _
   ByVal uri As Uri _
) As CookieCollection
[C#]
public CookieCollection GetCookies(
 Uri uri
);
[C++]
public: CookieCollection* GetCookies(
 Uri* uri
);
[JScript]
public function GetCookies(
   uri : Uri
) : CookieCollection;

Parameters

uri
The URI of the Cookie instances desired.

Return Value

A CookieCollection containing the Cookie instances associated with a specific URI.

Exceptions

Exception Type Condition
ArgumentNullException uri is a null reference (Nothing in Visual Basic)

Remarks

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

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

CookieContainer Class | CookieContainer Members | System.Net Namespace | Cookie | CookieCollection | CookieContainer | CookieException

Show:
© 2014 Microsoft