top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Delegates as parameters in VB.NET

+3 votes
48 views

Can we use Delegates as parameters in VB.NET? If yes, how?

posted Feb 17, 2014 by Merry

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+3 votes
 
Best answer

When you are passing Function as parameter, it is known as Delegate.

declare the delegate:
Public Delegate Sub SomeWorkDelegate(ByVal strSomeString As String)

declare a function which will accept delegate:
Public Sub GetSomeWork(ByVal someDelegateFunc As SomeWorkDelegate)
someDelegateFunc("Here is the work")
End Sub

answer Feb 17, 2014 by Atul Mishra
Similar Questions
+4 votes
+2 votes

Is there a class/method we can use in VB.net to transform a website in html format to xml format? If there is can you please type the codes out thanks!

+4 votes

How to create Create, read, write and delete event logs in VB.NET

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...