[英]What happens when a computer is offline and a WebClient makes a request?
What happens when I make a request with a WebClient object when the computer is offline? 当我在计算机脱机时使用WebClient对象发出请求时会发生什么? Is there a way to detect that beforehand.
有没有办法事先检测到。 or should I be handling some sort of exception?
或者我应该处理某种例外?
A WebException will be thrown. 将抛出WebException。 http://msdn.microsoft.com/en-us/library/system.net.webexception(v=vs.80).aspx
http://msdn.microsoft.com/en-us/library/system.net.webexception(v=vs.80).aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.