I'm trying to convert 12122
( base 3) to int
value ,
However I saw in reflector - the supported bases are 2,8,10,16
public static int ToInt32(string value, int fromBase)
{
if (((fromBase != 2) && (fromBase != 8)) && ((fromBase != 10) && (fromBase != 0x10)))
{
throw new ArgumentException(Environment.GetResourceString("Arg_InvalidBase"));
}
return ParseNumbers.StringToInt(value, fromBase, 0x1000);
}
(I think they missed the 4 between 2-8 but nevermind.... )
So , how can I convert base 3 to base 10 ? ( Why didn't they give the option anyway?...)