Quote Originally Posted by high6
Now also i got a number as a string and am wondering how do i convert it to a number?
Use the Parse or TryParse method of the type you want to convert the string to. If you know for sure that the string represents a valid number then use the Parse method. If there's a chance that it may not be valid, like if it's been entered by the user in a TextBox, then use the TryParse method.