开发者

What happens when a computer is offline and a WebClient makes a request?

开发者 https://www.devze.com 2023-02-20 05:30 出处:网络
What happens when I make a request with a WebClient object when the computer is offline? Is there a way to detect that beforehand. or should I be handling some so开发者_Python百科rt of exception?A Web

What happens when I make a request with a WebClient object when the computer is offline? Is there a way to detect that beforehand. or should I be handling some so开发者_Python百科rt of exception?


A WebException will be thrown. http://msdn.microsoft.com/en-us/library/system.net.webexception(v=vs.80).aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消