adding a double and a float
hello i was following the course of the server for c# and the people in the video added a float and a deciaml together without changing their nature but when i do it i have an error,why ? ( i know its bad to add them together because it will create mistakes and i am not planning to i just want to know why does it work for them and not me ?)


6 Replies
look again
i dont see it 😅


ohhhhh
ok thx
the important bit here is that the result is a
double
, not a float
, which would be a lossy conversion
and needs to be explicitly cast, if you want to do it
$closeIf you have no further questions, please use /close to mark the forum thread as answered