将输出编译为文本框 [英] Compile output to textbox

查看:80
本文介绍了将输出编译为文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨......

我知道可以创建C#编译器。

我的项目如何工作?

编译成功之后输出打印到命令行。

但我真的需要输出打印到textBox。

请建议我谢谢。



我尝试了什么:



我需要输出打印到textBox。

Hi...
I know it possible to create C# compiler.
How my project work?
after compile is success the output print to command line.
But really i need the output print to textBox.
Please suggest me Thank you.

What I have tried:

I need the output print to textBox.

推荐答案

我非常怀疑你是在构建一个C#编译器。我认为你在做的是使用csc.exe从命令行编译你的应用程序,这非常好。



所以你想把输出定向到文本框?答案很简单。创建一个GUI,可以为命令行编译器开票,然后将输出重定向到您希望的任何UI元素,文本框,标签等。





您可以查看这篇文章,它将帮助您入门。

启动流程并显示其标准输出 [ ^ ]
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.


You can review this article and it will help you get started.
Launching a process and displaying its standard output[^]


或者,您可以尝试使用CodeProvier -

从CodeDOM图生成和编译源代码 [ ^ ]

https://support.microsoft.com/en -us / kb / 304655 [ ^ ]

CodeDomProvider类(System.CodeDom.Compiler) [ ^ ]
Alternately, you can try using CodeProvier -
Generating and Compiling Source Code from a CodeDOM Graph[^]
https://support.microsoft.com/en-us/kb/304655[^]
CodeDomProvider Class (System.CodeDom.Compiler)[^]


这篇关于将输出编译为文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆