a.ToString("x")可以把10变成a string.Format("{0:xxxx}", a)可以把10变成000a 转载于:https://www.cnblogs.com/z45281625/p/9525174.html