+ 2

How would i convert an input to a string

so when you use an user input that is an int you would use (name) = Convert.ToInt32 (console.readline ()); how would i do the same for a string?

31st Jan 2017, 10:01 PM
Hatty_Cat
3 Answers
+ 6
Taking in input with Console.ReadLine() will always return a string (or null). .ToString is unnecessary with ReadLine() 👍
1st Feb 2017, 3:07 AM
Jafca
Jafca - avatar
+ 1
thanks man
31st Jan 2017, 10:52 PM
Hatty_Cat