.net - help in c# and webclient class -


i need enable cookie webclient (windowsform project)

i found solution in link

using cookiecontainer webclient class

but can not understand how apply ? should create new class (it not work) or need change variables make suitable project ?

i need explain me how apply it, , if have solution supply me it.

this it:

public class cookiemonsterwebclient : webclient {     public cookiecontainer cookies { get; set; }      protected override webrequest getwebrequest(uri address)     {         httpwebrequest request = (httpwebrequest)base.getwebrequest(address);         request.cookiecontainer = cookies;         return request;     } } 

also check out previous answer similar topic here.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -