Hi,

I am having a problem using Math.Round(). My program reads in a decimal from a windows form text box,converts this to a double. Then I am trying to round off the double to the nearest whole number. However this is not working it does not round off the number at all. Here is my code:


double hedgeRatio = Convert.ToDouble(HR.Text);
hedgeRatio = System.Math.Round(hedgeRatio,0);

I am using visual c# 2008 express edition to build my program. Also is it possible to read in a number from the user in a windows form instead of using a Text Box and then converting to a double?

Thanks All, any help or suggestions would be great.

Cheers,
The Big Ham