string n = string.Format("{0:000}-{1:00}-{2:00}-{3:00}-{4:000000}-{5:000000}"
,"20G","34","41","1","3G","2004");
如果值为int,则上述方法有效,但在这种情况下它们不能。是否可以在string.Format中使用字符串值进行填充,或者我必须执行以下操作:
string n = string.Format("{0}","20G".PadLeft(3,'0'));