int Num=13
var code =Num.ToString().PadLeft(4, '0');

code:0013

  

相关文章: