Hi,
Some basic stuff,
Let say that I give you 10 apples and 5 oranges and ask you how many apples you have, and you reply 15 apples. Does that make any sense to you?
int is short for integers, in English it means numbers i.e. 0,1,2,3,.....
string is an array of char ( short for Characters) 'H' 'e' 'l' 'l' 'o'.
you can convert an int to string, the computer magically get the corresponding character for you. But you cannot convert a string to an int unless that string corresponds to a number.
For example:
int a = 10;
string aToString = a.ToString();
string b = "B";
int bToInt = int.Parse(b);
int bToInt = Convert.ToInt32(b);
Neither of the above code will work, because b is not a representation of number.
However, if the value of b is a representation of a number, then the above codes will convert the string to int.
In your solution 2 you making it even worse by assigning to an object. An object is a type that doesn't know whether the value you assigned is a number or character, its like a basket that you do not know whether it has apples or oranges. If you happen to have oranges in the basket and ask to convert the contents of the basket to apples, it is an impossible task. the same applies to your solution 2, it will throw exception.
I hope you understand this.
Regards
Jegan