How to use delagates in vb.net

  • How to use delagates in vb.net

    for further details and related topics http://www.codecorner.somee.com/
  • 1 Comment sorted by


  • This is the simplest example to understand Delegates

    Public Delegate Sub SetParameterValueDelegate(ByVal value As String)

    ' Public Event SetParameterValueCallback As SetParameterValueDelegate

    Private Sub Onb2Click2(ByVal a As String)
    MessageBox.Show(a)
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim b2 As New SetParameterValueDelegate(AddressOf Onb2Click2)
    ' AddHandler SetParameterValueCallback, AddressOf Onb2Click2
    b2.Invoke("Faraz")
    End Sub

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week

    Optimum Creative