Results 1 to 4 of 4

Thread: "MustInherit" Keyword

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2003
    Posts
    436

    "MustInherit" Keyword

    Hi everybody,

    I am new to vb.net . I understood the concept of using "Mustinherit" keyword. but I don't really understand under what circumstances it would be useful in the realworld.

    If you guys have any ideas or experiences or scenarios when to use "Mustinherit" please share with me.

    thank you sir.
    basam nath
    [email protected]

  2. #2
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148
    When you are defining a base class you would typically use this.

    For example, I have a base class which is a print event listener. Classes can be inherited from it to save the print event to a log file, or a database or to send it in an email, for example but any such class must have a method to be called when a print event occurs....therefore this is defined in the base class using MustInherit.

  3. #3
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    That seems similar to the Abstract keyword in C#...is that the VB.NET equivalent?
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  4. #4
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148
    Yup : MustinHerit == Abstract

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width