Why can't we change double to float, or just add float as third variable? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why can't we change double to float, or just add float as third variable?

18th Jul 2016, 9:50 AM
某某人
某某人 - avatar
1 Answer
+ 1
You have to use the System.Convert.ToSingle(double value)-methode for that. But be aware of the posibilities of overflows (exception handling) and precision lacks.
22nd Jul 2016, 1:32 AM
Idril
Idril - avatar