Tag:

从其他接口inheritance的接口的显式C#接口实现

考虑以下三个接口: interface IBaseInterface { event EventHandler SomeEvent; } interface IInterface1 : IBaseInterface { … } interface IInterface2 : IBaseInterface { … } 现在考虑以下实现IInterface1和IInterface 2的类: class Foo : IInterface1, IInterface2 { event EventHandler IInterface1.SomeEvent { add { … } remove { … } } event EventHandler IInterface2.SomeEvent { add { … } remove { … } […]