Is there a way to copy a class's source to string, in C#?
<p>I have a class:</p>

<pre><code>public class SomeClass {
// properties and methods here
}
</code></pre>

<p>Ideally I'd like to send the entire class to a string so I can render it in a view. The best way I can think of doing this, is to have a build script run and send it all to static text files, then reference those text files in the code. Is there a better way to do this? I'd like to be able to say:</p>

<pre><code>return View(SomeClass.SourceToString());
</code></pre>

<p>I'm hoping I'm not missing a really obvious way to accomplish this.</p>
