What is the significance of delegates. Where should they be used? What are the situations where we require them?
Submitted by: AdministratorDelegates 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
Submitted by: Administrator
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
Submitted by: Administrator
Read Online VB .Net Job Interview Questions And Answers
Top VB .Net Questions
☺ | What is difference between import System.Data.SqlClient,System.Data.Oledb? |
☺ | What does it meant to say "the canonical" form of XML? |
☺ | Differences between VB.Net and C#, related to OOPS concepts |
☺ | How to store and retrieve images in SQL server database through VB.NET? |
☺ | Which is the tool which can convert Visual basic old version to .NET compatibility version? |
Top Dot Net Technologies Categories
☺ | MSF Interview Questions. |
☺ | .Net Architecture Interview Questions. |
☺ | ASP.Net MVC Interview Questions. |
☺ | Entity Framework Interview Questions. |
☺ | C# (Sharp) Programming Language Interview Questions. |