Hello,
I need to have this number rounded and have never done this before, so If you can help me that would be great.
long mem1 = Convert.ToInt64(objPartition["Size"].ToString()) / 1024 / 1024 / 1024 + 0;
Currently it is reporting 3GB and should be 4GB
So this number must be close to 3.xxxx and need to be round up to 4.xx
I found this on msdn, but dont understand how to make it work with my line of code.
Math.Round(3.44, 1); //Returns 3.4.
Math.Round(3.45, 1); //Returns 3.4.
Math.Round(3.46, 1); //Returns 3.5.
Thanks for your help,
-Mike
I need to have this number rounded and have never done this before, so If you can help me that would be great.
long mem1 = Convert.ToInt64(objPartition["Size"].ToString()) / 1024 / 1024 / 1024 + 0;
Currently it is reporting 3GB and should be 4GB
So this number must be close to 3.xxxx and need to be round up to 4.xx
I found this on msdn, but dont understand how to make it work with my line of code.
Math.Round(3.44, 1); //Returns 3.4.
Math.Round(3.45, 1); //Returns 3.4.
Math.Round(3.46, 1); //Returns 3.5.
Thanks for your help,
-Mike