How do I convert the Cookies collection to a generic list? Easily

Posted by Naeem Sarfraz on Stack Overflow See other posts from Stack Overflow or by Naeem Sarfraz
Published on 2010-05-27T16:05:39Z Indexed on 2010/05/27 16:11 UTC
Read the original article Hit count: 242

Filed under:
|

Anyone know how I can convert Request.Cookies into a List<HttpCookie>? The following didn't work as it throws an exception.

List<HttpCookie> lstCookies = new List<HttpCookie>(
    Request.Cookies.Cast<HttpCookie>());

© Stack Overflow or respective owner

Related posts about generics

Related posts about .net-3.5