What I want to do is a method that uses a generic type as a constrained parameter. However, the constraint type also has a second generic type, but I want this method to work no matter what the second imprint is:
public class IEvent<T> where T : EventArgs { }
public class EventManager
{
public void DoMethod<T>() where T: IEvent<???>
{
}
}
In particular, I try to get my class to EventManagerreceive some kind of event, and then do something with it. Am I embarrassing something, or is it doable?
source
share