title: How i can Execute string as C# code in sandbox
body: <p>Anyone knows how i can create a Sandbox to execute string as c# code in net5 or net6?</p>
  <p>For example i have STRING:</p>
  <pre><code>public int WhichBigger(int param1, int param2)
  {
  return param1 &gt; param2 ? param1 : param2;
  }
  </code></pre>
  <p>I want to execute this string as c# code, pass params to it and capture the answer</p>
  <p>I found this for net 4.XXX: <a href="https://github.com/JamesTryand/ConsolR" rel="nofollow noreferrer">https://github.com/JamesTryand/ConsolR</a></p>
  <p>I can't do by  Roslyn Scripting because there is a possibility of code injection by other users. I need sandbox, only interact inside it. If anyone inject &quot;delete C&quot; the sandbox  wouldn't do anything because it doesn't have c, I guess I'm explaining myself</p>
  <p>Thanks</p>