Interface in VB.net
On button click:
Public Class Interface_form
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim obj As New classInterface
obj.add(TextBox1.Text, TextBox2.Text)
End Sub
End Class
Create an interface and write the code below:
Public Interface Interface1
Sub add(ByVal n1 As Integer, ByVal n2 As Integer)
End Interface
Public Class classInterface
Implements Interface1
Public Sub add(ByVal n1 As Integer, ByVal n2 As Integer) Implements Interface1.add
MsgBox("Sum is : " & n1 + n2)
End Sub
End Class
Comments
Post a Comment