【问题标题】:Can System.Int32.ToString() specify a custom radix?System.Int32.ToString() 可以指定自定义基数吗?
【发布时间】:2010-11-22 06:53:08
【问题描述】:

我想将 int 转换为带有 base36(0-9 和 a-z)的 string

这是如何在 .NET 中完成的?

【问题讨论】:

    标签: .net string tostring


    【解决方案1】:

    唯一接近的是Convert.ToString(),它只允许转换为基数2、8、10和16。您必须滚动自己的转换,或使用this sample on CodeProject

    【讨论】:

      猜你喜欢
      • 2015-05-09
      • 1970-01-01
      • 2023-01-19
      • 2017-04-15
      • 1970-01-01
      • 2016-08-02
      • 2023-01-01
      • 2017-05-12
      • 2012-03-04
      相关资源
      最近更新 更多