Thursday, July 9, 2009

What is the difference between Convert.ToInt32 and Int32.Parse

if(STRING != null)
{
    Convert.ToInt32(string) AND Int32.Parse(string) Yield Identical Results;
}
else
{
     Int32.Parse(null) throws an ArgumentNullException;
     Convert.ToInt32(null) returns a zero;
}


No comments: