C# ICodeCompiler - running a class
<p>I've just discovered the .NET ICodeCompiler (be aware that I know nothing about it, except that it can run programs within a program). How would I go about writing a scripting architecture around this? </p>

<p>Ideally, I would like the user to write some code that derives from an interface. This interface would be defined by me within my program (it cannot be edited by the user). The user would implement it, and the CompileEngine would run it. My program would then call the various methods they have implemented. Is this feasible?</p>

<p>eg. They would have to implement this:</p>

<pre><code>public interface IFoo
{
  void DoSomething();
}
</code></pre>

<p>I would then compile their implementation and instantiate their object:</p>

<pre><code>// Inside my binary
IFoo pFooImpl = CUserFoo;
pFooImpl.DoSomething();
</code></pre>
