Forums » .NET » .NET »

what is diff bet convert.ToInt32() and Parse.Toint32() ?


Posted Date: 23 Mar 2007      Posted By:: Ripal Patel     Member Level: Gold  Member Rank: 0     Points: 2   Responses: 1

what is difference between convert.ToInt32() and Parse.Toint32() ?

Responses

#115456    Author: Bhuvaneswari      Member Level: Gold      Member Rank: 0     Date: 23/Mar/2007   Rating: 2 out of 52 out of 5     Points: 2

Hi

Both(Convert.ToInt32 and int.Parse) will return the same result in
most of the cases. But null is handled differently.

If suppose the string is the null,
Convert.ToInt32 will return zero.
but the int.Parse will throw ArgumentNullException error.


 
Post Reply     

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.





  • Return to Discussion Forum
  • Start new thread


  • Top Contributors
    Today
      Last 7 Days
        more...

        Awards & Gifts

        Online Members

        More...
         
        Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India