Which one is faster, powerfull and reliable. And why ?
int.Parse() int.TryParse() Convert.ToInt32()
Go read this ("Performance Profiling Parse vs. TryParse vs. ConvertTo") for much add'l info.
If you are unsure if the string is parsable, then int.TryParse() will be MUCH faster than either of the others and catching the exceptions.
int.TryParse()
1.4m articles
1.4m replys
5 comments
57.0k users