补位 string str = "100"; str.PadLeft(5,'0') 输出:00100 str.PadRight(5, '0') 输出:10000 转载于:https://www.cnblogs.com/DOGame/p/8694599.html