Quickest way to convert a base 10 number to any base in .NET?

Convert.ToString can be used to convert a number to its equivalent string representation in a specified base. Example: string binary = Convert.ToString(5, 2); // convert 5 to its binary representation Console.WriteLine(binary); // prints 101 However, as pointed out by the comments, Convert.ToString only supports the following limited – but typically sufficient – set of bases: … Read more