private void _2() { //Create new application domain //Main advantage the domain is release assembly before unload domain AppDomain codeDomain = AppDomain.CreateDomain("CodeDriver"); CodeDriver cd = (CodeDriver)codeDomain.CreateInstanceAndUnwrap("17-Assemblies", "_17_Assemblies.CodeDriver"); cd.CompileAndRun(code); }
private void _1() { CodeDriver cd = new CodeDriver(); cd.CompileAndRun(code); }