Skip to content

Instantly share code, notes, and snippets.

@revirth
Last active August 29, 2015 13:56
Show Gist options
  • Save revirth/9047125 to your computer and use it in GitHub Desktop.
Save revirth/9047125 to your computer and use it in GitHub Desktop.
// http://goo.gl/UWuR3W
IEnumerable<string> numbers = Enumerable.Range(1, 100).Select(x = > x.ToString("D3"));
foreach(var n in numbers)
Console.WriteLine(n);
//
// 001
// 002
// 003
// ~~~
// 100
//
// http://msdn.microsoft.com/ko-kr/library/dwhawy9k(v=vs.110).aspx#DFormatString
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment