cutting off digits and rounding up/down

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Streen
    New Member
    • Jul 2010
    • 1

    cutting off digits and rounding up/down

    I am looking for a function in visial basic.net that takes a string, containing a decimal, like 12.5958, and returns the string with x numbers of digits behind the comma with appropriate rounding.

    like x = 3 --> 12.596
    and x = 2 --> 12.60

    I can write it myself, but I am hoping its out there already, savingme the time.

    thanks
Working...