I.T. Discussion Community!
-Collapse +Expand
VB.Net
Search VB.Net Group:

Advanced
-Collapse +Expand VB.Net To/From
To/FromCODEGuides
-Collapse +Expand VB.Net Store
PRESTWOODSTORE

Prestwood eMagazine

July Edition
Subscribe now! It's Free!
Enter your email:

   ► KBProgrammingVB.NetOOP   Print This     

All Groups:

Next Random Article Next Random Tidbit || Narrow Topic

Random Tidbit

Part of the mo. lesson in the Jan 16 Issue of Prestwood eMag
VB.Net Code Snippet:
 A flashcard from our VB.Net Flashcards Library
 A code snippet from our VB.Net Code Snippets Page
 Tags: VB.Net , Abstraction
VB.Net Abstraction (MustInherit, MustOverride, Overrides)

VB.Net supports abstract class members and abstract classes using the MustInherit and MustOverride modifiers.An abstract class is indicated with a MustInherit modifier and is a class with one or more abstract members and you cannot instantiate an abstract class. However, you can have additional implemented methods and properties. An abstract member is either a method (implicitly virtual), property, indexer, or event in an abstract class. You can add abstract members ONLY to abstract classes using the MustOverride keyword. Then you override it in a descendant class with Overrides.


Public MustInherit Class Cyborg
  Public MustOverride Sub Speak(ByVal pMessage As String)
End Class

Public Class Series600
  Inherits Cyborg

  Public Overrides Sub Speak(ByVal pMessage As String)
    MessageBox.Show(pMessage)
  End Sub
End Class

Time To Sign In

You must sign in to read the rest of this document.

Not a member? Join now! Membership is instant and free!

UserID or Email:  Enter your account email, permanent UserID, or current display name.
Password: 
    Remember Me

Or...
 Sign Up  Forgot Password?
Switch to longer article version of VB.Net Abstraction (MustInherit, MustOverride, Overrides) (VB.Net Language)

More Info

Definition:  Abstract Class / Abstract Member

Comments

0 Comments.
Share a thought or comment...
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1174A1
Enter key:
Code Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #101348 Counter
24246
Since 10/24/2008
Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech