0
点赞
收藏
分享

微信扫一扫

C# 类型转换

覃榜言 2022-07-14 阅读 112
string转其他
string转double

参考链接:

  • 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

参考链接:

  • 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​​

橘子Jane



举报

相关推荐

0 条评论