title: load dll library and run code within during runtime
body: <p>I have a C# console application and like to chose by user input a specific dll library that is loaded and executed during the runtime of the console app. Is that possible? </p>
  
  <p>So, for example, I may have 2 dll libraries with the same static class and Action name as follows:</p>
  
  <pre><code>public static class CoreStrategy
  {
      public static Action&lt;List&lt;Quote&gt;&gt; strategyQuoteBuffer = new Action&lt;List&lt;Quote&gt;&gt;(quoteList =&gt;
      {
          Console.WriteLine("I am dll 1");
      });
  }
  
  public static class CoreStrategy
  {
      public static Action&lt;List&lt;Quote&gt;&gt; strategyQuoteBuffer = new Action&lt;List&lt;Quote&gt;&gt;(quoteList =&gt;
      {
          Console.WriteLine("I am dll 2");
      });
  }
  </code></pre>
  
  <p>How can I load one of them during the runtime of my console app and invoke them, then switch one for the other one? Or are there better ways to handle this? Maybe even different ways from Dlls? Requirement is that the code of each is strictly contained within its own dll, only and the dlls cannot be referenced beforehand. If that is not doable then would you be able to suggest a way without the usage of dlls? Thanks</p>