title: c# unity calling method using reflection on proxy
body: <p>I'm stucked on one problem. I'm having piece of code like this:</p>
  
  <pre><code>ITest test= ObtainObject(); //ObtainObjectimplementation omitted
  Type type = test.GetType();
  MethodInfo method = type.GetMethod("Display");
  method.Invoke(test, new object[] {"hi"});
  
  interface ITest {
      [LoggerAspect]
      Display(String msg);
  }
  
  class Test : ITest 
  {
      public void Display(String msg) 
      {
          MessageBox.Show(msg);   
      }
  }
  </code></pre>
  
  <p>The problem is that when I replace </p>
  
  <pre><code>method.Invoke(test, new object[] {"hi"});
  </code></pre>
  
  <p>with</p>
  
  <pre><code>test.Display("Hi")
  </code></pre>
  
  <p>everything, including aspect, works fine. The test is an proxy object and if I call the invoke on that proxy it throws me </p>
  
  <pre><code>TargetException: Object does not match target type
  </code></pre>
  
  <p>The issue is I need to use reflection, has any of you ever faced such a problem?
  Thanks for advices</p>