int i = ;
Console.WriteLine(i.ToString("D3"));
Console.WriteLine(i.ToString(""));
Console.WriteLine(i.ToString().PadLeft(,''));
MSDN字符串格式相关参考:https://msdn.microsoft.com/zh-cn/library/dwhawy9k.aspx
2021-12-13 21:48:15
int i = ;
Console.WriteLine(i.ToString("D3"));
Console.WriteLine(i.ToString(""));
Console.WriteLine(i.ToString().PadLeft(,''));
MSDN字符串格式相关参考:https://msdn.microsoft.com/zh-cn/library/dwhawy9k.aspx