Is there any built-in way to convert an integer to a string (of any base) in C#?

前端 未结 6 2027
梦毁少年i
梦毁少年i 2020-12-20 20:02

Convert.ToString() only allows base values of 2, 8, 10, and 16 for some odd reason; is there some obscure way of providing any base between 2 and 16?

6条回答
  •  悲哀的现实
    2020-12-20 20:18

    You could try the following:

    http://www.dotnetspider.com/resources/938-Conversion-Decimal-number-any-Base-vice.aspx

    This at least gives the impression that you could have any base (from 2->16). Although Im a little confused as to why you would want to !

提交回复
热议问题