Suppose I have the following parent class defined:
Public Class Parent
Public Property Prop1 As String = "MyDB1"
End Class
And I wish to inherit it, but want that property to have a different value for the child class.
I figured I could do it as follows:
Public Class Child
Inherits Parent
Public Sub New()
MyBase.New()
MyBase.Prop1 = "MyDB2"
End Sub
End Class
But I was wondering if this was the best way to do this or if there is something like an Overridable property OR if this is just bad programming practice as a whole?
Thanks!