+ 1
Int.Parse or ConvertToInt32 C#
Which one is better(how it works) and how to use it correctly?
1 Antwort
+ 5
Some insights, found from a quick search on the net. If string is the conversion subject mostly, prefer `TryParse`. Simpler in use and handles invalid conversion subject pretty well 👍
https://www.c-sharpcorner.com/article/uses-of-int-parse-convert-toint-and-int-tryparse/
https://stackoverflow.com/questions/199470/whats-the-main-difference-between-int-parse-and-convert-toint32