Ignoring the question of whether or not such an approach is beneficial, if
you want to use a declarative event hookup/handler then you should use this
approach. Remember that essentially what happens when you use WithEvents is
that this field is now morphed into a property when the project is compiled.
So basically when you assign this to something, you'll get the value and the
hookup will take place. On the other hand, when you set it, the events are
unhooked, the value is assigned and then any new events are hooked back in.
If you are going to trap InfoMessage
http://www.knowdotnet.com/articles/connections.html or whatever other events
than this would certainly make things a little cleaner. I know this sounds
like a dodge of the question, but the usefulness really depends on the
implementation and what you're trying to accomplish.
If I may, what is the ultimate goal you are trying to accomplish with this
vs having a connection defined in a dataaccess layer/class for instance?