Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Net;
- namespace Common
- {
- public class WebClientWTimeout : WebClient
- {
- int _timeout;
- public WebClientWTimeout(int timeout)
- {
- _timeout = timeout;
- }
- protected override WebRequest GetWebRequest(Uri address)
- {
- var wreq = base.GetWebRequest(address);
- wreq.Timeout = _timeout;
- return wreq;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment