title: How to call crossappdomaindelegate-Method with parameters
body: <p>i would like to call the method crossappdomaindelegate with a method-name which needs a parameter.</p>
  
  <p>Example:</p>
  
  <pre><code>myAppdomain.DoCallback(new CrossAppDomainDelegate(MyMethod));
  
  private static void MyMethod(string myParam)
  {
    Console.Write("my param="+ myParam);
  }
  </code></pre>
  
  <p>how can I pass a parameter in new CrossAppDomainDelegate(MyMethod....)?</p>
  
  <p><strong>Update:</strong> 
  Just to complete Maarten's answer to my specific case:
  I had also add an ResolveHandler to find already loaded assemblies.
  Just if anyone else has similar Problems.</p>
  
  <pre><code>_myNewAppDomain.AssemblyResolve += MyResolveEventHandler;
  
          public static Assembly MyResolveEventHandler(Object sender, ResolveEventArgs args)
          {
              var dllName = args.Name.Split(',')[0];
  
              var currentAppdomain = (AppDomain) sender;
  
              var file = currentAppdomain.GetAssemblies().FirstOrDefault(f =&gt; f.FullName.Split(',')[0] == dllName);
  
              return file;
          }
  </code></pre>