Suppose I have a class of objects called Porky with a property called IsHuge:
Now I want to make a special kind of Porky -- let's call it UberPorky -- for which I want to change ALL instances to either IsHuge or not IsHuge. What I'd like to do is this:Code:Public Class Porky Public Property IsHuge As Boolean End Class
The trouble is, I can't do that. I'm not allowed to reference MyBase or Me in a Shared property. So can anyone advise me on the right way to do it?Code:Public Class UberPorky Inherits Porky Public Overrides Shared Property IsHuge As Boolean Get Return MyBase.IsHuge End Get Set(value As Boolean) MyBase.IsHuge = Value End Set End Property End Class
BB




Reply With Quote