title: event firing from codedom generated dll - how to join an event of a runtime generated dll form main exe application
body: <p>I have some user inputs of type <code>string[]</code> for calculations. I want to compile them and get faster computation than any other method.</p>
  <p>User input strings:</p>
  <pre><code>double _1 = 2 + 2;
  double _2 = _1 + Get_Variable(&quot;var1&quot;);
  return _2;
  </code></pre>
  <p>I convert the input to strings which are suitable for generating a dll</p>
  <pre><code>namespace namespace_Calculator
  {
      public class Class_Calculator
      {  
          public static double Start_Calculating()
          {
             //user defined string[] type calculation inputs
             double _1 = 2 + 2;
             double _2 = _1 + Get_Variable(&quot;var1&quot;);
  
              return _2;
             //user defined string[] type calculation inputs
          }
      }
  }
  </code></pre>
  <p>How can I return the <code>Get_Variable()</code> function from main exe?
  I'm currently using <code>DataTable().Compute()</code></p>
  <p>I can call <code>Start_Calculating()</code> and get result without variables.</p>
  <pre><code>object[] p = new object[] { };
  Assembly yeni = AppDomain.CurrentDomain.Load(File.ReadAllBytes(Dll_location));
  Type t = yeni.GetType(&quot;namespace_Calculator.Class_Calculator&quot;);
  MethodInfo mi = t.GetMethod(&quot;Start_Calculating&quot;);
  object ins = Activator.CreateInstance(t);
  double cevap = (double)mi.Invoke(ins, p);
  </code></pre>
  <p>Thanks in advance.</p>