abstract class question......

threeo

Member
Joined
May 26, 2010
Messages
15
Programming Experience
1-3
man...i am TRYING to understand abstract classes.....
i am looking at someone's existing code and something has me baffled.....

there seems to be a function that can NOT find actually fleshed out anywhere. not even in any of the "import" references.

here is the line of code:

MustOverride Function GetUniqueBookID() As Integer

and here is the ONLY call to it in the entire solution:
Return Me.createNewBook(Me.GetUniqueBookID)

i have searched the entire solution....but there is no other mention or fleshing out of this "getUniqueBookID" function - so i have no idea how it works!

can anyone shed any light?
 
Me keyword refers to current instance, which is an instance of a class that inherits the abstract class. You can't create an instance of a MustInherit class, so it is the actual implementation that is called. The abstract class can safely call this method since (a) it is defined (similar to interface members), and (b) the inherited non-abstract class must implement it.
 
Back
Top