I have a property in a base class with some attributes on it:
[MyAttribute1]
[MyAttribute2]
public virtual int Count
{
get
{
// some logic here
}
set
{
// some logic here
}
}
In a deriving class I have done this, because I want to add MyAttribute3 to the property and I cannot edit the base class:
[MyAttribute3]
public override int Count
{
get
{
return base.Count;
}
set
{
base.Count = value;
}
}
However, the property is now behaving like it doesn't have MyAttribute1 and MyAttribute2 on it. Am I doing something wrong, or do attributes not inherit?