Given the below interface declarations:
Declaration A
public interface EventHandler<T>
{
void Handle(T command);
}
Declaration B
public interface EventHandler<in T>
{
void Handle(T @event);
}
In normal testing these all do the same thing. The Handle
method is called as expected.
In what ways do the above vary, and how do they behave differently in other scenarios?