Monday, November 21, 2011

String to Number conversion

To convert a string to a number, you can use one of the following methods

<DataType>.Parse
Convert.To<DataType>

For example, to convert a string to int, you can use

int.Parse
or
Convert.ToInt32

No comments:

Post a Comment