I need to create a function which rounds decimal numbers like this:
Round(“$32.95”, 0) to -> $33
Round(“85.86%”, 1) to -> 86.9%
where first parameter is string and second parameter is number of decimal points required
I am using Math.round but it is converting to 85.9
An algorithm you can use (I don’t know C#):