c# String 前面不足位数补零的方法 (转贴)

String.Format("{0:D5}",16);

or
 int i=16;
 i.ToString("D5");
Result: 00016
 
5代表位数
原文地址:https://www.cnblogs.com/gaotaozhaolei/p/1430970.html