0

How convert var to double (with Convert.To)?

Var num = 5; num = num + 2.55; Convert.ToDouble(num); Console.WriteLine(num); Error!

12th Nov 2018, 3:07 PM
Mike Willems
Mike Willems - avatar
2 Respuestas
0
Try this var num = 5; var num2 = Convert.ToDouble(num); num2 += 2.55; Console.WriteLine(num2 );
12th Nov 2018, 3:54 PM
Mike
0
thx
3rd Dec 2018, 12:55 PM
Mike Willems
Mike Willems - avatar