What is the difference between Convert.ToInt32 and int.Parse?

Q

What is the difference between Convert.ToInt32 and int.Parse?

✍: Guest

A

What is the difference between Convert.ToInt32 and int.Parse?
* Both are same and both can handle null value.
* Convert.ToInt32 can handle null value but int.Parse throws ArgumentNullException error.
* int.Parse can handle null value but Convert.ToInt32 throws ArgumentNullException error.
* Both Convert.ToInt32 and int.Parse cannot handle null value.


Convert.ToInt32 can handle null value but int.Parse throws ArgumentNullException error.

2014-07-09, 1656👍, 0💬