質問

In VB.net, I have to use AddHandler (to add handler function dynamically) without the brackets. However if I use brackets like:

AddHandler(MyBtn.Click, AddressOf MyBtn_Click)

It does not work. The call must be without brackets. Is there any equivalent syntax for calling AddHandler using brackets? Is AddHandler different from subroutine or a function (method) of some class?

役に立ちましたか?

解決

It's a statement, not a function call. Just like Return.

You wouldn't do

Return(x)
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top