I am a beginner in vb.net and i need help with exception handling. My
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim length As Integer
Dim Area As Integer
Dim Volumeanswer As Integer
Area = TextBox3.Text
length = TextBox4.Text
Volumeanswer = length * Area
MessageBox.Show(Volumeanswer)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim height As Integer
Dim width As Integer
Dim length As Integer
Dim AA As Integer
height = TextBox1.Text
width = TextBox2.Text
AA = height * width
MessageBox.Show(AA)
End Sub
End Class
This is what my application looks like
Thanks for anybody that try and helps!!!
program must include a Try, Catch, and Finally keywords and they must function correctly (i.e. if the user defines an impossible calculation, there must be an error message shown; if not, there must be some action to indicate there was no error even if it is simply showing the answer).
My program is a calculator that finds the volume of a cube if that is needed to help
Please any code shown how to do it or how it should look would be amazing this is what i have.
Public Class Form1My program is a calculator that finds the volume of a cube if that is needed to help
Please any code shown how to do it or how it should look would be amazing this is what i have.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim length As Integer
Dim Area As Integer
Dim Volumeanswer As Integer
Area = TextBox3.Text
length = TextBox4.Text
Volumeanswer = length * Area
MessageBox.Show(Volumeanswer)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim height As Integer
Dim width As Integer
Dim length As Integer
Dim AA As Integer
height = TextBox1.Text
width = TextBox2.Text
AA = height * width
MessageBox.Show(AA)
End Sub
End Class
This is what my application looks like
Thanks for anybody that try and helps!!!