I've used this before - hitting the limits of decimal isn't very
likely in my situation :)

On 5 Jan, 21:48, Joe Enos <[email protected]> wrote:
> One quick and dirty way - don't know if this is the best solution:
> Math.Floor(d * 100) / 100
>
> It will work fine for normal numbers, but as you approach the limits
> of the Decimal type, it may not be 100%.
>
> On Jan 5, 2:35 pm, Maya <[email protected]> wrote:
>
>
>
> > Hi everyone,
>
> > How can I round the following decimal figures to 30.54 decimal:
>
> > 30.540
> > 30.541
> > 30.542
> > 30.543
> > 30.544
> > 30.545
> > 30.546
> > 30.547
> > 30.548
> > 30.549
>
> > I know that Math.Floor does that some how, but can't figure out how to
> > use it to produce 30.54 precisely.
>
> > Thanks,
>
> > Maya.- Hide quoted text -
>
> - Show quoted text -

Reply via email to