请问这样的cookie字符串怎么解析加入到 CookieContainer ???
Cookie字符串是: useChoose=0; PHPSESSID=42rjs6k9n62boricqncb9eqmh7; B=v=2&d=WTrhkCVP4AhZRp7iDu3ITggi; __utma=78548747.2072945511.1378882335.1378882335.1378882335.1; __utmb=78548747.2.10.1378882335; __utmc=78548747; __utmz=78548747.1378882335.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); beacon_visit_count=1; Hm_lvt_5b1c66c0038831e9e1152672f90991be=1378294581,1378296264,1378297568,1378882339; Hm_lpvt_5b1c66c0038831e9e1152672f90991be=1378882339; b_t_s=t178882334978xs像其中的 B=v=2&d=WTrhkCVP4AhZRp7iDu3ITggi 这个格式要怎么解析 Cookie中包含Cookie ?? --------------------编程问答--------------------
new Cookie("B","v=2&d=WTrhkCVP4AhZRp7iDu3ITggi","/",new Uri("http://www.baidu.com/").Host)
根据分号分割,之后根据第一个等号分割即可。
注意用Trim()去掉空格,不然会出错
补充:.NET技术 , C#