当你的才华不能撑起你的野心时,就是你该选择学习的时候了!

C#数字前补0

[TestMethod]
        public void Test8()
        {
            int a = 9;
            string b = string.Format("{0:000000}", a);
            string c = a.ToString().PadLeft(6, '0');

        }

 

posted @ 2019-07-29 13:09  hofmann  阅读(1594)  评论(0编辑  收藏  举报