VB .NET Working with Delegate and Events

  • Thread starter Thread starter Kareninstructor
  • Start date Start date
K

Kareninstructor

Guest
Blog entry with code samples in a personal GitHub repository.

From hobbyist to seasoned developers delegates are avoided or attempts are made to understand them, which in many cases is met with frustration. I see questions on various forums where code could be refactored by using delegates and when making suggestions to use delegates generally the response is something like “that is over my head, what I have works!”. Well just because code works does not mean there is room for refactoring.

Search the Internet for VB.NET delegates and find out there are an abundance of post while the majority are not fully working examples and may be untested which can lead back to frustration.

The first mistake some coders make is not reading Microsoft documentation on delegates or think outside the box and study C# code samples and a decent C# to Visual Basic converter as there are more code samples in C# than Visual Basic. One must understand that there are cases like with MulticastDelegate class there is syntactic difference on how to use them when seeking code samples in C# so best to go to the Microsoft documentation but don't expect to find many code samples in Visual Basic

Blog entry
GitHub repository

1621440.png

1621441.png

1621442.png

1621443.png


1621444.png


1621445.png


Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

NuGet BaseConnectionLibrary for database connections.

StackOverFlow
7218100.png

Continue reading...
 

Similar threads

K
Replies
0
Views
212
Kareninstructor
K
K
Replies
0
Views
155
Kareninstructor
K
K
Replies
0
Views
104
Kareninstructor
K
K
Replies
0
Views
124
Kareninstructor
K
Back
Top