Question: Visual Basic 2022 1. In the code example that sets 1 ngAnswer to the result of a division expression, change IngAnswer from a Long to
Visual Basic 2022

1. In the code example that sets 1 ngAnswer to the result of a division expression, change IngAnswer from a Long to a Single (call it sngAnswer). Next, remove the If statements that test the contents of the text box before performing the division. Do you get the same two exceptions that you did when the variable was a Long? Why or why not? 2. Rewrite the code that sets lngAnswer to the result of a division expression so that the code is wrapped in a Try... End Try structure. Remove the If statements that perform data validation, and create Catch sections for the exception that might be thrown
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
