Results 1 to 7 of 7

Thread: When should we use 'Abstract class' in vb.net

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2003
    Posts
    436

    Question When should we use 'Abstract class' in vb.net

    I understood the concept of abstract class and also know how to implement in vb.net.

    But in the real world what are the possible scenarios when we could be using the abstract classess. In my opinion if the class can't be instantiated (abstract class) what is the use of the template/abstract class?

    Please share your thoughts .

    thank you
    nath

  2. #2
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    take a look at this thread, posted several days ago >>

    http://www.vbforums.com/showthread.p...hreadid=264281

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2003
    Posts
    436
    sorry didn't understand those replies...

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    An abstract class is much like an interface and would be used in similar circumstances.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2003
    Posts
    436

    any example for abstract class?

    Edniss,

    thanks for the reply.
    I have visited your website and you have written some wonderful code.

    In the practical world do we use abstract classess at all?
    if they are being used, could you please give me some examples?

    thank you
    nath

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Try here: http://www.vbdotnetheaven.com/Code/Jun2003/2032.asp or here: http://archive.devx.com/dotnet/artic...1/pa110501.asp

    Examples off of the top of my head are some plugin type systems or collectionbase type classes. I have used abstract classes in both of those scenerios. It primary use again is somewhat like Interfaces but you would use an abstract class when you want to also pass along some functionality along with the structure. For instance I made an extended collectionbase that handles datagrids better and does some things I also end up implementing in to my collections. It isn't intended to be used by itself but it is intended to be inherited and give a quick jump on extending another object. So you make it abstract and it can't be used unless it is married to another object.

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2003
    Posts
    436

    Smile thank you so much for the input

    nath

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