How to write code in C#, Asp.Net, Php, Javascript, C. On this blog you will find example codes that will help you to understand concepts of programming.
Tuesday, September 18, 2012
How to format a number to x decimal places in C#?
If you have a decimal, double or int data type number and you want to show the number with a certain decimal places then you can use ToString() method from System namespace.
Have a look at these examples. I hope you will find what you need.
No comments:
Post a Comment