Chapter 16 Inheriting Forms and Creating Base Classes 413
To Do This
Set properties for an
object variableUse the regular syntax for setting object properties. For example:
Employee.FirstName = TextBox1.Text
Inherit a base class
in a new classCreate a new class, and use the Inherits keyword to incorporate the base
class’s class definitions. For example:
Public Class Teacher
Inherits Person
Private Level As ShortPublic Property Grade() As Short
Get
Return Level
End Get
Set(ByVal value As Short)
Level = value
End Set
End Property
End Class