ArgumentException : method arguments are incompatible
<p>I am trying to make an event system for special effects</p>

<p>I have this function ins a static class to allow me to link any basic event handler to any basic event, no matter the classes of each objects, as long as they have the needed functions</p>

<p>here is the function </p>

<p>(in a public static class with multiple really useful generic functions</p>

<pre><code>    public static bool eventLinker&lt;T,Y&gt;(T listener, Y speaker, string eventName, string eventHandler)
{
    EventInfo eInfo = typeof(Y).GetEvent(eventName);
    MethodInfo evHandler = typeof(T).GetMethod(eventHandler, new Type[2] {typeof(object), typeof(EventArgs)});
    Type handlerType = eInfo.EventHandlerType;

    if(eInfo != null &amp;&amp; evHandler != null &amp;&amp; handlerType != null)
    {

        Delegate d = Delegate.CreateDelegate(handlerType, speaker, evHandler);
        eInfo.AddEventHandler(listener,d);

        return true;
    }
    return false;
}
</code></pre>

<p>this should work wich any classes who have 
public event EventHandler SomethingHappened;</p>

<pre><code>public void nameOfTheFunctionThatTriggerTheEvent()
{
    EventHandler handler = SomethingHappened;
    if(handler != null)
    {
        handler(this, EventArgs.Empty);
    }

}
</code></pre>

<p>with any class who have</p>

<pre><code>public void HandleEvent(object sender, EventArgs e)
{
    Debug.Log("Something happened to " + sender);
}
</code></pre>

<p>I always get this error at Delegate.CreateDelegate</p>

<blockquote>
  <p>ArgumentException: method arguments are incompatible
  System.Delegate.CreateDelegate (System.Type type, System.Object
  firstArgument, System.Reflection.MethodInfo method, Boolean
  throwOnBindFailure) (at
  /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Delegate.cs:263)
  System.Delegate.CreateDelegate (System.Type type, System.Object
  firstArgument, System.Reflection.MethodInfo method) (at
  /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Delegate.cs:276)
  FunctionExt.eventLinker[Effect,Test] (.Effect listener, .Test speaker,
  System.String eventName, System.String eventHandler) (at
  Assets/_C#/FunctionExt.cs:41) GameUpdate.Awake () (at
  Assets/_C#/GameUpdate.cs:84)</p>
</blockquote>

<p>I could not find the solution anywhere.</p>