Check out example codes for "c# compile code at runtime". It will help you in understanding the concepts better.

Code Example 1

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);

Learn ReactJs, React Native from akashmittal.com