I highly doubt you are building a C# compiler. What I think you are doing is compiling your application from the command line using csc.exe, which is perfectly fine.
So you want to direct the output to a textbox? The answer is simple. Create a GUI that can invoice the command line compiler and then redirect the output to any UI element you wish, textbox, label, etc.
[EDIT]
You can review this article and it will help you get started.
Launching a process and displaying its standard output[
^]