intn = 3; strings = n.ToString().PadLeft(4,'0');//0003 s =string.Format("{0:d4}", n);//0003
stringsss =string.Format("{0:d8}",500); MessageBox.Show(sss);return; 代码自动补齐0