What’s the equivalent of the C# +=
operator when used to add event handl开发者_开发知识库ers in VB.NET?
TreeView1.TreeNodeDataBound += new TreeNodeEventHandler(TreeView1_TreeNodeDataBound);
Something like:
AddHandler TreeView1.TreeNodeDataBound, AddressOf TreeView1_TreeNodeDataBound
First define a method with the same signature as the event and use the AddHandler Statement to tie the event with the method.
精彩评论