I have a generic interface, which looks like this:
public interface IObjectProvider<out T>
{
event Action<T> ValueOccured;
}
Now I want to make a class, which implements this interface two times like this:
public class GlobalReceiver : IObjectProvider<Foo>, IObjectProvider<Bar>
{
public event Action<Foo> IObjectProvider<Foo>.ValueOccured;
public event Action<Bar> IObjectProvider<Bar>.ValueOccured;
}
and can't get it working, because for this compiler says that I need to use proper syntax and if I make non-explicit implementation I (as expected) get an error:
Member is already declared.
How can I figure out this problem?