Alex Rivera | Logout

How might I convert a double to the nearest integer value?

Asked 2009-03-11T04:32:05.237
187

How do you convert a double into the nearest int?

Edit
Report

1 Answer

17
double d;
int rounded = (int)Math.Round(d);
answered 2009-03-11T04:34:34.700

Your Answer