There are quite a few ways to achieve what you want, although you will have to type your result back to Decimal/Double afterwards. The problem is you are formatting the number, which can only be done via string manipulation. I'm sure there is a more direct approach, but I couldn't be bothered reading about Number Styles. Anyhoo.
Use String.Format("{0:F3}", 124.5)
Or MyDecimalValue.ToString("##.####")
The first method uses format specifiers, and there are many types to coincide with various formats, but if you just take the method, F3 = 3 decimal places.
The second method uses placeholders to format the text, and you just use the necessary amount of string[#] to act as a placeholder for the required number format. Don't forget to type the result back to Decimal/Double.
Enter your message below
Sign in or Join us (it's free).