5 Arithmetic Operator in VB.net

Code: In this we are adding two numbers as per the input given in two textbox.

Public Class Form1

    Dim Number1 As Integer
    Dim Number2 As Integer
    Dim Answer As Integer


    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Number1 = TextBox1.Text
        Number2 = TextBox2.Text
        Answer = Number1 + Number2
        MessageBox.Show(Answer)


    End Sub
End Class


Before Addition:



After Addition:



Previous
Next Post »