Dec 14, 2004 #1 marcasii Programmer Aug 27, 2001 109 AU Hi I have an int, say: Code: int myNumber = 1; and I want to display it as 01, how do you format numbers in C#? I only wan tthe number 1-9 to have preceeding zeros i.e. 01,02,03,..,09,10,11
Hi I have an int, say: Code: int myNumber = 1; and I want to display it as 01, how do you format numbers in C#? I only wan tthe number 1-9 to have preceeding zeros i.e. 01,02,03,..,09,10,11
Dec 14, 2004 #2 JohnYingling Programmer Mar 24, 2001 3,742 US Try string sint = MyNumber.ToString("00"); http://www.VBCompare.com Compare Code Upvote 0 Downvote
Dec 14, 2004 Thread starter #3 marcasii Programmer Aug 27, 2001 109 AU Yep, perfect, thanks a lot. Upvote 0 Downvote