public class MyEvent<T> where T: class
{
 T _handlers;

static MyEvent()
{
if (!typeof(T).IsSubclassOf(Delegate)) throw new NotSupportedException("ゴルア");
}

 public void Add(T handler) { _handlers = (T)Delegate.Combine((Delegate)_handlers, (Delegate)handler); }
 public void Remove(T handler) { _handlers = (T)Delegate.Remove((Delegate)_handlers, (Delegate)handler); }
 public void Invoke(params object[] parameters) { ((Delegate)_handlers).DynamicInvoke(parameters); }
}