Answers for "how to compile code in c#"

C#
2

c# compile code at runtime

using System.CodeDom.Compiler;

CSharpCodeProvider codeProvider = new CSharpCodeProvider();
CompilerParameters myParameters = new CompilerParameters();
myParameters.GenerateExecutable = false;
myParameters.OutputAssembly = @"C:\assembly.dll";
CompilerResults results = codeProvider.CompileAssemblyFromSource(myParameters, code);
Posted by: Guest on September-02-2020

C# Answers by Framework

Browse Popular Code Answers by Language