Imagine an interface heirarchy like this:
public interface IAnimal
{
string Color { get; }
}
public interface ICat : IAnimal
{
}
In this case, ICat 'inherits' IAnimal's Color property.
Is it possible to add an attribute to the ICat's Color property, without adding it to the IAnimal?
The following is an example of what I am trying to achieve, but gives a compiler warning:
public interface IAnimal
{
string Color { get; }
}
public interface ICat : IAnimal
{
[MyProperty]
string Color { get; }
}