Can some please just explain this to me. If I output the following code:
It says:
Thats funny because according to my calculator it is 0.083 recurring. Is there any particular reason why c# feels the need to rewrite the rules of mathematics without mentioning it? Sometimes I want to spit blood at ASP.NET for making such simple tasks so difficult.
Anyways, can someone please help? I need to do lots of calculations in this part of my app but all I am getting are integer results, even when variables are initialised as double. Why?
Code:
Convert.ToString(1 / 12)
It says:
Code:
0
Thats funny because according to my calculator it is 0.083 recurring. Is there any particular reason why c# feels the need to rewrite the rules of mathematics without mentioning it? Sometimes I want to spit blood at ASP.NET for making such simple tasks so difficult.
Anyways, can someone please help? I need to do lots of calculations in this part of my app but all I am getting are integer results, even when variables are initialised as double. Why?
Last edited: