Convert string to int32 default value

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hello All,

Is there a possibility in C# other then try / catch to convert a string to
int32 with a default value , so the default value is in case of empty string
is 0 otherwise the succesfull converted string?

Thanks
Peter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top