C# - failed parse exception?

后端 未结 10 1327
春和景丽
春和景丽 2021-02-19 07:35

I am writing a program in C#, and I want to catch exceptions caused by converting \"\" (null) to int. What is the exception\'s name?

EDIT: I\'m not sur

10条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-19 08:11

    When the exception fires you can see it's type. The smart thing to do is handle that case and display a graceful message to your user if possible.

提交回复
热议问题