Assume certain facts. Points is the name of an int variable, and TextBox is the name of a TextBox control. Create an if-else statement that converts the Text property of the pointsTextBox control to an int and saves the result in the points variable using one of the TryParse methods. If the conversion fails, a message box will appear with an error message.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter3: Coding With Variables, Named Constants, And Calculations
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question

Assume certain facts. Points is the name of an int variable, and TextBox is the name of a TextBox control. Create an if-else statement that converts the Text property of the pointsTextBox control to an int and saves the result in the points variable using one of the TryParse methods. If the conversion fails, a message box will appear with an error message.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
ListBox
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning