We have two classes BasicRace & AdvancedRace. AdvancedRace inherits from BasicRace
I have a BasicRace but i want to 'convert' it to the advanced class.
See code below as a example:
Module Module1
Sub Main()
Dim bRace As New BasicRace With {.CourseID = 1, .MeetingDate = "2013-05-01", .RaceNumber = 1}
Dim aRace As New AdvancedRace
' Upgrade bRace to AdvancedRace???????
End Sub
End Module
Public Class BasicRace
Public Property MeetingDate As Date
Public Property CourseID As Integer
Public Property RaceNumber As Integer
End Class
Public Class AdvancedRace
Inherits BasicRace
Public Property RaceTitle As String
End Class
Any help would be great - I'm starting to think it can not be done unless i write a function to convert a basicRace to AdvancedRace going through each property one by one?