In the code below, if the user enters thirty-seven into the TextBox1, the MessageBox will display:
Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click
Dim intX As Integer
Try
intX = Convert.ToInt32(TextBox1.Text) Messagebox.Show(intX)
Catch ex As Exception
Messagebox.Show("Sorry, that is not a valid number, try again!")
End Try
End Sub
A.No MessageBox will be displayed.
B.Sorry, that is not a valid number, try again!
C.37.
D.38.