Reputation: 625
What’s the equivalent of the C# +=
operator when used to add event handlers in VB.NET?
TreeView1.TreeNodeDataBound += new TreeNodeEventHandler(TreeView1_TreeNodeDataBound);
Upvotes: 1
Views: 132
Reputation: 9193
First define a method with the same signature as the event and use the AddHandler Statement to tie the event with the method.
Upvotes: 1
Reputation: 26796
Something like:
AddHandler TreeView1.TreeNodeDataBound, AddressOf TreeView1_TreeNodeDataBound
Upvotes: 4