I've customized this little example from one of my lengthy classes when I was training to do this kind of stuff (note : I included some explanation to these classes but you still have to read more about inheritance ) :
VB Code:
  1. 'Parent Class
  2. Public Class Price
  3.  
  4.     'Conststans
  5.     Private Const Sandwich_1 As Decimal = 3.0
  6.     Private Const Sandwich_2 As Decimal = 3.5
  7.     Private Const Sandwich_3 As Decimal = 3.95
  8.     Private Const Sandwich_4 As Decimal = 4.5
  9.     Private Price As Decimal
  10.  
  11.  
  12.     'Child Class
  13.     Public Class Sandwiches
  14.         'We start inheritance by using this keyword.
  15.         'It allows us to integrate (use) the Parent'
  16.         'Class variables , properties , methods in
  17.         'this Child Class . You have also MustInherit
  18.         'directive which forces child to inherits Parent
  19.         'Class ..etc .See list for these keywords and
  20.         'discription for each one in the Help Files
  21.  
  22.         Inherits Price
  23.         Public Sandwich_ID As Decimal
  24.  
  25.         Public Enum Sandwiches_en
  26.             GLINDA = 1
  27.             THE_Wicked = 2
  28.             Hagatha = 3
  29.             Burt = 4
  30.         End Enum
  31.  
  32.         Public Function SandwichesFunction(ByVal Index As Sandwiches_en) As Decimal
  33.  
  34.             If Index = Sandwiches_en.GLINDA Then
  35.                 'See here : We are able to see the Private variables
  36.                 'of the Parent Class and we can Get or Set
  37.                 'its value , moreover all Methods, Properties
  38.                 'of the Parent Class no matter they are
  39.                 'Private of Public , they are still
  40.                 'accessible from anywhere in out Child
  41.                 'Class.This applies to the below code also
  42.                 Sandwich_ID = MyBase.Sandwich_1
  43.                 Return Sandwich_ID
  44.             ElseIf Index = Sandwiches_en.THE_Wicked Then
  45.                 Sandwich_ID = MyBase.Sandwich_2
  46.                 Return Sandwich_ID
  47.             ElseIf Index = Sandwiches_en.Hagatha Then
  48.                 Sandwich_ID = MyBase.Sandwich_3
  49.                 Return Sandwich_ID
  50.             ElseIf Index = Sandwiches_en.Burt Then
  51.                 Sandwich_ID = MyBase.Sandwich_4
  52.                 Return Sandwich_ID
  53.             End If
  54.  
  55.         End Function
  56.  
  57.     End Class
  58.  
  59.  
  60.  
  61. End Class