Hi,
I have a generic method that has some parameter of a generic Type. What I want to do, is be able to access the method on this generic type parameter inside my function.
public void dispatchEvent<T>(T handler, EventArgs evt)
{
T temp = handler; // make a copy to be more thread-safe
if (temp != null)
{
temp.Invoke(this, evt);
}
}
I want to be able to call the Invoke method on temp, which is of type T. Is there a way to do this?
Thank You.