Q: C#中有没有什么方法将 一位整数转为两位整数?
如:1,2,3....
转为两位整数 如:01,02,03....
如:1,2,3.... 你这是什么类型的呢 每个类型处理也不一样啊
int a = 1;
string b = a.ToString("D2"); // 01
public string PadLeft(int totalWidth)
public string PadLeft(int totalWidth, char paddingChar)
string s="1";
var s1=s.PadLeft(2,'0');