我有以下接口層次:不能通過子接口參數在C#
public interface IActor { ... }
public interface IHealthUser : IActor { ... }
和第三接口:
public interface IAction { void Perform(IActor caster) }
爲什麼下面不合法,我可以得到解決不知何故?
public class HealthPotion : IAction
{
public void Perform(IHealthUser caster) { ... }
}
@ZoharPeled「‘HealthPotion’不實現成員「IAction。 Perform(IActor)' – user1323245