Quote:
The reason is, all the code for the proprety is the same for all the children and I would hate to copy it from the parent to all the children just to change the TypeConverter attribute.
try to make this property
virtual
public abstract class A : UserControl
{
[Bindable(true)]
[TypeConverter(typeof(CustomEnumConverter))]
public virtual CustomEnum MyBaseClassEnum
{
get { (code to return the value) }
set { (code to set the value) }
}
}
public class B : A
{
[TypeConverter(typeof(CustomClassBEnumConverter))]
public override CustomEnum MyBaseClassEnum
{
get { return base.MyBaseClassEnum; }
set { base.MyBaseClassEnum = value; }
}
}