public string ConvertString(string value, int fromBase, int toBase) { int intValue = Convert.ToInt32(value, fromBase); return Convert.ToString(intValue, toBase); } 其中fromBase爲原來的格式 toBase爲將要轉換成的格式string