c# generate class from interface
<p>I've got the following interface</p>

<pre><code>public interface ITransaction
{
  IProduct Product { get; set; }
  ISomeInterface InterfaceRef { get; set; }
}
</code></pre>

<p>During the execution of the program I want to generate the actual class file as a string or something and receive the following back</p>

<pre><code>public class Transaction
{
  Product Product { get; set; }
  SomeInterfaceObject InterfaceRed { get; set; }
}
</code></pre>

<p>At the end of the application, I want to save the string as a class file, and convert it to a xsd for other purposes. In order to be able to do so, I need to change all my interfaces to something that's not an interface, but sort of an instance of a class of that interface.</p>

<p>I want to do all this without actually creating the "Inheriting" file manually.</p>

<p>Hope this makes sense.</p>
