Mr Beanstar Mr Beanstar - 1 year ago 131 Question

( rounding to 2 decimal places

I am creating a program for a project that will help me learn visual basic. But when I work out how much a certain material is worth with dimensions. It come out with more than two decimal places. I know how to use math.floor function but it doesn't round to 2 decimal places.

Does anyone know what function I should use to round to two decimal places?

Answer Source

The Decimal.Round method will do the trick for you. You can specify the number of decimal places.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download