Adds a System.Net.Cookie to a System.Net.CookieContainer. This method uses the domain from the System.Net.Cookie to determine which domain collection to associate the System.Net.Cookie with.
- cookie
- The System.Net.Cookie to be added to the System.Net.CookieContainer.
If the CookieContainer.Count property equals or exceeds the CookieContainer.Capacity property, one or more System.Net.Cookie instances are removed from the container before adding the cookie parameter. Enough System.Net.Cookie instances are removed to bring CookieContainer.Count below CookieContainer.Capacity as follows: if there are expired instances in the given scope, they are cleaned up. If not, then the least recently used System.Net.CookieCollection is found and removed from the container.