C# 幾進制 轉換到幾進制

public string ConvertString(string value, int fromBase, int toBase) 



int intValue = Convert.ToInt32(value, fromBase); 

return Convert.ToString(intValue, toBase); 


其中fromBase爲原來的格式 

toBase爲將要轉換成的格式string

相關文章
相關標籤/搜索