base_convert in .NET
问题 Does .NET have a native function that is equivalent to PHP's base_convert or will I need to write my own? I want to convert from any base to any other base -- where either the 'to' base or the 'from' base can be any integer 2-36. Example of the PHP function: base_convert($number_to_convert, $from_base, $to_base) // convert 101 from binary to decimal echo base_convert('101', 2, 10); // 5 As noted by Luke in the comments of Jon Skeet's answer: Convert.ToString can't handle conversion to/from