Judging by the tags you used on this question, it looks like you are confused.
CookieContainer and CookieCollection are used with HttpWebRequest when your program is an HTTP client. CookieCollection stores cookies associated with a single domain name. CookieContainer stores all cookies on top of all domain names.
ASP.NET HttpRequest.Cookies has an HttpCookieCollection and is used when your program is an HTTP server. It stores cookies sent by the client to the server. Since there is only one domain name (i.e. yours), there is no need for a two-dimensional collection.
Two sets of classes ( CookieContainer and CookieCollection vs HttpCookieCollection ) are completely unrelated to each other.
In this post, I provided some basic background for the cookie collection classes in .NET, but I don't understand your question. What are you trying to do?
Dai source share