I have following SQL Server statement, I want to convert this into c#. I know there is something called Math.Round in C#. I have tried but C# returns the same results c# returns an int back. For details please check the Test & results below:
SQL SERVER
Select ROUND(SUM(someValue) / 60,0)
C#
var alpha = Math.Round(someValue / 60, 0);
Tests & Result
select ROUND(150.75, 0)
-- Result = 151.00
var alpha = Math.Round(150.75, 0);
// Result = 151
Can anyone please suggest me why its not putting .00 in the end. In real values will there be any difference. I am looking ro replace SQL with C#.
Thanks