I've the following class:
namespace Warnings
{
public abstract class BaseWarningIntField : IWarningInnerDataField
{
public string PropName;
public string HeaderCaption;
public sealed WarningInnerDataType DataType
{
get { return WarningInnerDataType.Integer; }
}
}
}
I want the last property DataType
to be not overridable, since that's the base class for a warning-detail field of type Integer, so it needs to always return the correct type WarningInnerDataType.Integer
.
Anyway, the compiler give me the following error:
'Warnings.BaseWarningIntField.DataType' cannot be sealed because it is not an override
But, as far as I know the override
does exactly the opposite of what I'm trying to achieve.