about data type convert

  • Thread starter Thread starter authorking
  • Start date Start date
You want to use int.Parse(string);

e.g.

string s = "12345";
int i = int.Parse(s);
 
Hi,

Int.Parse() will rise an exception if the string parameter is not
convertible to an integer, you will have to wrap it on a try/catch

cheers,
 
Back
Top