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
Let's have a look at the documentation (which is a much cleaner solution that "trying it out"):
public static int Parse(string s)
[...]
Exceptions:
ArgumentNullException
: s is null.FormatException
: s is not in the correct format.
This should answer your question. As others have already mentioned, maybe you are asking the wrong question and want to use Int32.TryParse instead.