0

If i give a string input whether it will convert to integer?

for example i hav given age as convert.Toint32 and give the input as two...if it convert...and i tried its not converting

4th Sep 2016, 5:34 AM
Ratheesh krishna
Ratheesh krishna - avatar
4 Answers
+ 3
yes this is not possible you have to write switch cases for it
5th Sep 2016, 3:28 AM
Samkitkumar Jain
Samkitkumar Jain - avatar
+ 1
you mean you entered the word "two"? and you expect it to be converted as "2" is that what you mean?
4th Sep 2016, 11:47 AM
Erwin Mesias
Erwin Mesias - avatar
0
yes i mean that erwin
5th Sep 2016, 3:41 AM
Ratheesh krishna
Ratheesh krishna - avatar
0
That's not how you you Convert.ToInt32() method. if that's the output you want, you need may need to make conditions for that.
8th Sep 2016, 6:06 PM
Erwin Mesias
Erwin Mesias - avatar