• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
0

Problem with Convert.ToInt32

how to resolve the problem when you enter a string and not a integer ? https://code.sololearn.com/chF8mhtKvFUq/#cs Thanks !

c#encapsulation
10th Mar 2020, 9:29 AM
said
3 Answers
+ 1
It works fine on me.
10th Mar 2020, 9:54 AM
Nootnoot
Nootnoot - avatar
+ 1
Either use: int.TryParse Or: Try/Except
10th Mar 2020, 10:03 AM
Mihai Apostol
Mihai Apostol - avatar
+ 1
Thanks. I have found
6th Jun 2020, 10:19 AM
said

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
What are ctx.save() and ctx.restore() in canvas?
0 Votes
How to do a game
0 Votes
اريد برنامج بيع شاهي احمر وشاهي حليب وكبتشينو
0 Votes
What could i use c# and c++ for?
1 Votes
What course is worth and best in this time ?
0 Votes
the language in Arabic is wrong the English words with the Arabic words make faults please fix this problem fastest you can
1 Votes
Hey Guys, How to learn PHP in sololearn???
0 Votes
What do you think about using AI?
0 Votes
What is Decorator in Python ? Can Someone Explain Clearly??
1 Votes
¿Cómo puedo aprender esto no entiendo del todo?
0 Votes