字符串补0

来源:互联网 发布:java截取中文 编辑:程序博客网 时间:2024/05/03 10:15

 例如:把'5'转换成'0005'可以用ToString().PadLeft(4,'0');或5.ToString("0000")