Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# display float with 2 decimal places

myFloatVariable.ToString("0.00"); //2dp Number

myFloatVariable.ToString("n2"); // 2dp Number

myFloatVariable.ToString("c2"); // 2dp currency
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #display #float #decimal #places
ADD COMMENT
Topic
Name
8+4 =