可以用string.Format实现补零:

string.Format("{0:00}", 3);

输出:03

更多可以参考:http://www.cnblogs.com/tuyile006/archive/2006/07/13/449884.aspx

posted on 2012-03-22 20:40  elycir  阅读(115)  评论(0编辑  收藏  举报