string转其他
string转double
参考链接:https://www.cnblogs.com/xu-yi/p/11255080.html
- double.Parse(): static Double Parse(string s)
- Convert.ToDouble(): static double ToDouble(string value)
- double.TryParse(): static bool TryParse(string s, out Double result)
string转int
参考链接:https://www.cnblogs.com/yueyingky/p/4398584.html
- int.Parse()
- Convert.ToInt32()
- int.TryParse()
- (int)
cast转换?
参考链接:https://www.nhooo.com/note/qa07w4.html
强制转换和类型转换
参考链接:https://docs.microsoft.com/zh-cn/dotnet/csharp/programming-guide/types/casting-and-type-conversions