我正在开发一个 C# 项目。 我正在使用
Ping
来 ping 多个远程系统,有时我会看到 PingException
引发,但这本身并不是很有帮助,因为它似乎没有给出引发异常的任何原因。
备注中:
Applications should check the inner exception of a PingException object to identify the problem.
我该怎么做?
要获取实际的异常,请使用
InnerException.Message
。