Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format number with preceeding zero

Status
Not open for further replies.

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top