title: How to create a script engine class in C#
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2151719/is-it-possible-to-make-a-call-to-a-c-application-from-a-c-application">Is it possible to make a call to a C# application from a C++ application?</a>  </p>
  </blockquote>
  
  
  
  <p>I am playing with the idea of writing a proof of concept application that contains a script engine that runs (executes) a <a href="http://en.wikipedia.org/wiki/List_of_CLI_languages" rel="nofollow noreferrer">.CLI language</a> (e.g. C#, VB.Net etc). </p>
  
  <p>I had originally wanted to create the script engine application in C++, but that appears to be fraught with problems and work arounds. Instead, I want to write the script engine in C# instead now.</p>
  
  <p>I have sketched together a very rough idea of what it is I'm trying to do below:</p>
  
  <p>The code is still pseudo C++, but hopefully, the semantics should be clear:</p>
  
  <pre><code>class GenericDotNetLangInterpreter
  {
      public:
         Results run(const Arguments&amp; args);       
  
      protected:
         GenericDotNetLangInterpreter(const std::string &amp;script);
  };
  
  class MyInterpreter : private GenericDotNetLangInterpreter
  {
     public:
         MyInterpreter(const LanguageType l);
         Results run(const Arguments&amp; args);       
  }
  </code></pre>
  
  <p>Couple of questions:</p>
  
  <ol>
  <li><p>Has someone done this kind of thing before, and is there some code I can use as a reference point?</p></li>
  <li><p>what are some gotchas I need to be aware of going down this path?</p></li>
  </ol>