Table of Contents

Class CompilerUtils

Namespace
NanoByte.Common.Native
Assembly
NanoByte.Common.dll

Provides helper methods for compiling .NET code at runtime.

public static class CompilerUtils
Inheritance
CompilerUtils

Methods

CompileCSharp(CompilerParameters, string, string)

Compiles a string of C# code using the newest C# compiler available on the system.

public static void CompileCSharp(this CompilerParameters compilerParameters, string code, string manifest)

Parameters

compilerParameters CompilerParameters

The compiler configuration (e.g. output file path).

code string

The C# code to compile.

manifest string

The contents of the Win32 manifest to apply to the output file. Will only be applied if a C# 3.0 or newer compiler is available.