C# try {} catch {}

后端 未结 11 2416
既然无缘
既然无缘 2021-02-08 10:51

hi and thanks for reading. im a newbie in programming and C# and sockets programming. in my code i try and catch problems to provide fault tolarence in my app. the following:

11条回答
  •  被撕碎了的回忆
    2021-02-08 11:22

    It would catch all exceptions which inherit from Exception class. If they all are handled in the same way you can do it but you shouldn't as you can't handle all Exceptions inherited from Exception in the same way.

提交回复
热议问题