Also not the MidPointRounding parameter in some of the overloads for
Math.Round. If you don't specify this parameter it defaults to ToEven
which may give you unexpected results.
First of all some clarification:
An integer does not have fractions, but is only a natural number: 1, 2,
3, 4, ...
For numbers with fractions you can use either Single, Double or Decimal
datatype.
So, assuming that you use either Single, Double or Decimal:
If you want to display it on the screen, then you might want to use the
"Format" function like this:
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.