471,338 Members | 1,028 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 software developers and data experts.

AddHandler vs. Handles Clause in VB.NET...

Is there any advantage to using the Handles clause vs. using the AddHandler
to map events?
Jul 21 '05 #1
2 1964
AddHandler can be used at runtime. That's the biggest one for me. There
may be others.

Chris
"Roby2222" <ro******@community.nospam> wrote in message
news:D6**********************************@microsof t.com...
Is there any advantage to using the Handles clause vs. using the
AddHandler
to map events?

Jul 21 '05 #2
This is just different.

Handles is a way to declare that a sub handles a particular events (you can
also have multiple references in the handles clauses).
AddHandler does this at runtime.

I'm using both depending on the situation...

Patrice
--

"Roby2222" <ro******@community.nospam> a écrit dans le message de
news:D6**********************************@microsof t.com...
Is there any advantage to using the Handles clause vs. using the AddHandler to map events?

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Thiago Arrais | last post: by
7 posts views Thread by Jim Hubbard | last post: by
5 posts views Thread by Slim | last post: by
15 posts views Thread by Nathan Sokalski | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.