Overriding a read/write property to make it readonly
<p>I'm writing a custom control in C# based on TextBox.  I want the Text property of my control to be read-only (since only certain values are allowed in the textbox and I don't want the calling program to be able to put invalid values in there.)</p>

<p>I don't see how to do this. If I use public override Text {} the compiler inserts default get and set accessors. If I comment out the set accessor, the code compiles and runs, which I assume means the base accessor is being used. If I put readonly in the definition of my property, the compiler throws an error.</p>

<p>Any help would be greatly appreciated.</p>
