Difference between Convert.ToDecimal(string) & Decimal.Parse(string)

前端 未结 7 1791
傲寒
傲寒 2020-12-10 10:18

What is the difference in C# between Convert.ToDecimal(string) and Decimal.Parse(string)?

In what scenarios would you use one over the othe

相关标签:
7条回答
  • 2020-12-10 11:01

    One common suggestion related to original topic - please use TryParse() as soon as you not really sure that input string parameter WILL be correct number format representation.

    0 讨论(0)
提交回复
热议问题