【发布时间】:2011-07-26 08:25:12
【问题描述】:
可能的重复:
difference between Convert.ToInt32 and (int)
Whats the main difference between int.Parse() and Convert.ToInt32
C#
type.Parse() 方法和 ConvertTo 类的方法有什么不同吗?
【问题讨论】:
-
我会使用 type.TryParse 因为它更安全