B
Bill Menees
I've got a RichTextBoxEx inherited from RichTextBox, and I want to overload
the TextLength property to use TextBoxBase's implementation of TextLength.
But since TextBoxBase isn't my immediate base class, I don't know how to
call its TextLength property. Any ideas?
public override int TextLength
{
get
{
return base.TextLength; //Uses RichTextBox.TextLength, which I
don't want.
return TextBoxBase.TextLength; //Doesn't compile.
return base.base.TextLength; //Doesn't compile.
}
}
Any calls I make through a cast to my this pointer should just come right
back into my implementation rather than going to a base implementation since
TextLength is virtual. So is there a way to do this in C# without using
Reflection?
the TextLength property to use TextBoxBase's implementation of TextLength.
But since TextBoxBase isn't my immediate base class, I don't know how to
call its TextLength property. Any ideas?
public override int TextLength
{
get
{
return base.TextLength; //Uses RichTextBox.TextLength, which I
don't want.
return TextBoxBase.TextLength; //Doesn't compile.
return base.base.TextLength; //Doesn't compile.
}
}
Any calls I make through a cast to my this pointer should just come right
back into my implementation rather than going to a base implementation since
TextLength is virtual. So is there a way to do this in C# without using
Reflection?