Free since 2005 · No login required
AT

Academic Tutorials

Learn at your own pace

site-mobile-top-banner · 320x50

Creating an Application that Compiles and Runs User C# Code

Added 4 Mar 2009

Much of the available sample code that illustrates th creation of new AppDomains illustrates how to load code from an assembly file into that new AppDomain. This, of course, is the practical task most developers will need to perform. For illustrative purposes, and perhaps a little fun, we will take a slightly different tack. Our application will accept a C# script from the user, compile it, and then run it in a new AppDomain.