Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
i want to have format for integr number for example i have 10 i want display 010
or 4 i want to display 004 i want have always diplaying 3 number
Posted
Comments
Naveen Kumar Tiwari 27-Apr-15 7:54am    
what are you trying? not clear

Try this

C#
int value = 65;
  string number = value.ToString("000");


you can see these links for reference and for other methods

Formatting numbers [^]

String Format[^]
 
Share this answer
 
Comments
Member 11573837 27-Apr-15 8:02am    
hi KARTHIK Bangalore,
thank you for answering me
i want to put it lik this "{0:N}" if there's any way sir
Karthik_Mahalingam 27-Apr-15 9:11am    
yes there is, u can check the links i have mentioned.
if u have any doubt. pls reply
Member 11573837 27-Apr-15 10:09am    
thank you KARTHIK Bangalore
Karthik_Mahalingam 27-Apr-15 10:17am    
welcome :)
 
Share this answer
 
Comments
Member 11573837 27-Apr-15 8:10am    
hi Sergey Alexandrovich Kryukov,
thank you for answering me

my instruction is

RadHtmlChart1.PlotArea.YAxis.LabelsAppearance.DataFormatString = "{0:N}";

whene it execut it apear like this 12.00 i want to displal 012.00
Sergey Alexandrovich Kryukov 27-Apr-15 8:35am    
Then read the answer again.
—SA
Thanks7872 27-Apr-15 9:09am    
Read instructions from the boss first :laugh:
Sergey Alexandrovich Kryukov 27-Apr-15 9:17am    
Oh, yes... following instructions will lead far...
—SA
Member 11573837 27-Apr-15 10:08am    
thank you Sergey Alexandrovich Kryukov,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900