Tutorial Programming

Tutorial basic, Visual Studio VB.NET 2013 Pengunaan Errors Handling


Hallo sahabat saya akan menjelaskan Pengunaan Errors Handling pada visual studio 2013, oke langsung aja




Private Sub BtnCal_Click(sender As Object, e As EventArgs) Handles BtnCal.Click
Lbl_ErrMsg.Visible = False
Dim firstNum, secondNum, answer As Double
Try
firstNum = TxtNum1.Text
secondNum = TxtNum2.Text
answer = firstNum / secondNum
Lbl_Answer.Text = answer
Catch ex As Exception
Lbl_Answer.Text = “Error”
Lbl_ErrMsg.Visible = True
Lbl_ErrMsg.Text = ” One of the entries is not a number! Try again!”
End Try
End Sub



Sekian tutorial saya sahabat semoga bermanfaat yah.

No comments:

Post a Comment

Tutorial Programming Designed by Templateism | Ary EJFA Copyright © 2015

Theme images by richcano. Powered by Blogger.