Код: Выделить всё
interface IA
{
void Method();
}
class CustomAttribute : Attribute { }
interface IB : IA
{
[Custom]
new void Method();
}
class BaseA : IA
{
public void Method() => Console.WriteLine("Implementation in base");
}
class B: BaseA, IB
{
new public void Method() => Console.WriteLine("Implementation in B");
}
class C : BaseA, IB
{
}
Мой вопрос: почему в классе C< /code> новая реализация метода для IB выбирается из BaseA, хотя она помечена как новая в IB?
Где в спецификации C# указано, как разрешить реализацию в таком случае?
Есть ли у этого процесса разрешения имя?
Подробнее здесь: https://stackoverflow.com/questions/789 ... resolution