Dim salary As String = "5555"
' Sample 1
Dim mySalary As Double = Double.Parse(salary)
' Sample 2
mySalary = System.Convert.ToDouble(salary)
You can use the above code snippet to convert a string datatype into a Double datatype. If the string cannot be converted into a double, then it will throw an exception.