c# - Access to Compiler's errors and warnings -


I am developing a simple C # editor for one of my university courses and let me have a Concerber Collect errors (if they exist) and show them in my app In other words, I want to add C # compiler to my editor. Is there anything like this for debugger?

If you use CodeDomProvider

  Using Codedom; Using System.CodeDom.Compiler; Use of Microsoft CSARP; / / Compile part / / you change the parameters as you are viewing compiler parameter CP = = compiler parameter (); Var option = new system.Clolutions s.Generic.Dictionary & lt; String, string & gt; (); If (/ * you want to use 3.5 compiler /) {options.Add ("CompilerVersion", "v3.5"); } Var compiler = new CSharpCodeProvider (option); Compiler Results CR = Compiler. Compile Aspand Frame File (CP, Filename); If (cr.Errors.HasErrors) {foreach (compiler erar in cr.Errors) {do something with error / warning}}  

Comments