Difference between "Protected WithEvents myClassName" And "Protected myClassName" ?

Discussion in 'ASP .Net' started by Andreas Klemt, Jul 5, 2003.

  1. Hello,

    what is the difference between
    a) Protected WithEvents myClassName
    b) Protected myClassName

    Thanks,
    Andreas
    Andreas Klemt, Jul 5, 2003
    #1
    1. Advertising

  2. WithEvents is a VB.NET keyword to indicate that the object you are declaring
    can raise events, and you want to support the ability to respond to those
    events.

    --
    James J. Foster, DotNetCoders
    http://www.dotnetcoders.com


    "Andreas Klemt" <> wrote in message
    news:...
    > Hello,
    >
    > what is the difference between
    > a) Protected WithEvents myClassName
    > b) Protected myClassName
    >
    > Thanks,
    > Andreas
    >
    >
    James J. Foster, Jul 5, 2003
    #2
    1. Advertising

  3. Hello James,
    does this mean, when I have a UserControl Class like this

    Protected WithEvents ctlID As myUserControlClass

    that any Events in my UserControlClass like Button.Click will be
    automatically bubbled up to the parent class?

    What would happen when I only do this
    Protected ctlID As myUserControlClass

    Thanks you for any help!!
    Andreas

    "James J. Foster" <> schrieb im Newsbeitrag
    news:...
    > WithEvents is a VB.NET keyword to indicate that the object you are

    declaring
    > can raise events, and you want to support the ability to respond to those
    > events.
    >
    > --
    > James J. Foster, DotNetCoders
    > http://www.dotnetcoders.com
    >
    >
    > "Andreas Klemt" <> wrote in message
    > news:...
    > > Hello,
    > >
    > > what is the difference between
    > > a) Protected WithEvents myClassName
    > > b) Protected myClassName
    > >
    > > Thanks,
    > > Andreas
    > >
    > >

    >
    >
    Andreas Klemt, Jul 5, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jakk
    Replies:
    4
    Views:
    11,973
  2. Santa
    Replies:
    1
    Views:
    1,048
    Mark A. Odell
    Jul 17, 2003
  3. arnuld
    Replies:
    33
    Views:
    1,148
  4. PerlFAQ Server
    Replies:
    0
    Views:
    331
    PerlFAQ Server
    Jan 6, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    237
    PerlFAQ Server
    Apr 15, 2011
Loading...

Share This Page