I am using the WebClient class with cookies as mentioned here: Using CookieContainer with WebClient class
What steps are required to add a custom user agent to every request made by this WebClient?
I tried to put the
Headers.Add(HttpRequestHeader.UserAgent, "...")
line into
protected override WebRequest GetWebRequest
but that did not work: "This header must be modified using the appropriate property".