top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Delegates as parameters in VB.NET

+3 votes
284 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 LinkedIn 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

...