C# Int and math not returning full value.

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-04-07T17:52:36Z Indexed on 2010/04/07 18:03 UTC
Read the original article Hit count: 147

Filed under:
Int64 c1 = Convert.ToInt64(csvdeep[1]);
Int64 division = 1024;
string results = Math.Abs(c1 / division / division / division).ToString();

My c1 is 10201841664 and results is "9".

I'd perfer to get the 2nd two decimal places so my real result would be 9.50. Any tips on how I could get the 2 decimal places?

© Stack Overflow or respective owner

Related posts about c#