M
Matt
I want to convert a string to an integer, I tried the following 2 methods
and they both worked. But I dont understand in method 1: int.Parse(...),
"int" should be the primitive type, but it can operate a method Parse?
int t1 = int.Parse(TextBox2.Text); //method 1
int t2 = System.Int32.Parse(TextBox2.Text); //method 2
Another question is which approach is correct? When to use which?
Please help! Thanks!
and they both worked. But I dont understand in method 1: int.Parse(...),
"int" should be the primitive type, but it can operate a method Parse?
int t1 = int.Parse(TextBox2.Text); //method 1
int t2 = System.Int32.Parse(TextBox2.Text); //method 2
Another question is which approach is correct? When to use which?
Please help! Thanks!