convert string to another type

  • Thread starter Thread starter winthux
  • Start date Start date
winthux said:
How can I convert string i.e. to integer or to unsigned integer, or to other
types?

Look at the Convert class, and also things like Int32.Parse,
UInt32.Parse etc.
 
Yes, it's actually a piece of cake:

int a = int.Parse("-5");
int b = Convert.ToInt32("7");
 
Back
Top