Skip to content

Instantly share code, notes, and snippets.

@joymon
Last active August 29, 2015 14:21
Show Gist options
  • Save joymon/0f41b66a1dd4f6703915 to your computer and use it in GitHub Desktop.
Save joymon/0f41b66a1dd4f6703915 to your computer and use it in GitHub Desktop.
Roslyn code snippet for compiling C# code in console application
public void TestRoslynCompilation()
{
Compilation compilation = GetSimpleCompilation();
ImmutableArray<Diagnostic> diagnostics = Compile(compilation);
ShowDiagnostics(diagnostics);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment