BigInteger to Hex/Decimal/Octal/Binary strings?
问题 In Java, I could do BigInteger b = new BigInteger(500); Then format it as I pleased b.toString(2); //binary b.toString(8); //octal b.toString(10); //decimal b.toString(16); //hexadecimal In C#, I can do int num = int.Parse(b.ToString()); Convert.ToString(num,2) //binary Convert.ToString(num,8) //octal etc. But I can only do it with long values and smaller. Is there some method to print a BigInteger with a specified base? I posted this, BigInteger Parse Octal String?, yesterday and received