I am wondering if it is possible to access the underlying property of a base class within a derived that has overridden that property. I am using VB.NET and when I use the MyBase keyword to access the property of the base class, it accesses the overridden property instead.
Specifically, my class is inheriting the TextBox class and I am overriding the Text property to have it display something different based on the state of my class. I was hoping that when I use MyBase.Text within a private method in my class that it would bypass my overridden Text property and access the Text property of the base class directly, but it does not.
I know that I can shadow the property instead, but if I pass my class around as an instance of the base class elsewhere in my program, I don’t want it to be accessing the base class property directly. Is there any way I can get around this problem?