VB .Net Question: Download VB .Net PDF

What is the significance of delegates. Where should they be used? What are the situations where we require them?

Tweet Share WhatsApp

Answer:

Delegates are used as pointer to hold the controls actually i used the delegates when there is problem in VB.Net 2005 where each control is already threaded, to use my personla thread on these control i used delegates
Ex:
Private Delegate Sub dd()

Dim d1 As New dd(AddressOf c1)
Dim t1 As New Threading.Thread(AddressOf thread1)

public sub Thread1()
r1 =

Me.Label1.BeginInvoke(d1)

Me.Label1.EndInvoke(r1)
end sub

Public Sub c1()

Me.Label1.Text = ct1

Me.Label1.Refresh()

End Sub

Download VB .Net PDF Read All 69 VB .Net Questions
Previous QuestionNext Question
What is the difference between DataTable and DataSet?What is the size of .NET object?