var request = (HttpWebRequest)WebRequest.Create("https://example.com"); request.Method = "GET"; var response = (HttpWebResponse)request.GetResponse(); var cookies = response.Cookies;This code creates a request to the website "https://example.com" and receives the response. The Cookies property returns a CookieCollection containing all the cookies received in the response. It is a part of the .NET framework’s System.Net package library.