/// <Summary>
/// Traverse cookiecontainer
/// </Summary>
/// <Param name = "cc"> </param>
/// <Returns> </returns>
Public Static List <cookie> getallcookies (cookiecontainer CC)
{
List <cookie> lstcookies = New List <cookie> ();
Hashtable table = (hashtable) CC. GetType (). invokemember ("M_domaintable",
System. reflection. bindingflags. nonpublic | system. reflection. bindingflags. getfield |
System. reflection. bindingflags. instance,Null, CC,New Object[] {});
Foreach (Object Pathlist In Table. values)
{
Sortedlist lstcookiecol = (sortedlist) pathlist. GetType (). invokemember ( " M_list " ,
System. reflection. bindingflags. nonpublic | system. reflection. bindingflags. getfield
| System. reflection. bindingflags. instance, Null , Pathlist, New Object [] {});
Foreach (Cookiecollection colcookies In Lstcookiecol. values)
Foreach (Cookie C In Colcookies) lstcookies. Add (C );
}
Return Lstcookies;
}