CSharpScriptExecution.CompileAssembly

Compiles the source code for a complete class and then loads the resulting assembly.

Loads the generated assembly and sets the .Assembly property if successful.

If OutputAssembly is set, the assembly is compiled to the specified file. Otherwise the assembly is compiled 'in-memory' and cleaned up by the host application/runtime.

Must include parameterless ctor()

public bool CompileAssembly(string source, bool noLoad)

Parameters

source
Source code

noLoad
if set doesn't load the assembly (useful only when OutputAssembly is set)

Overloads