But how i can be sure that method has these exceptions?
You can read documentation of that method.You will see a section named Exceptions
,that list contains exceptions that method can possibly throw.For example take a look at the int.Parse
method documentation, you will see these exceptions in Exception list:
- ArgumentNullException
- FormatException
- OverflowException