从外部源执行代码 [英] Execute code from external source
本文介绍了从外部源执行代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否有一种方法可以从外部源编译/朗姆代码.
例如,假设我们有一个带有TextBox和Button的win窗体,并且我想在TextBox中编写一些代码,并且当我单击Button时,将执行在TextBox中编写的代码.
有人有任何想法或知识如何做到?
谢谢大家.
Hi,
I want to know if there is a way to compile/rum code fron external source.
for example, lets assume that we have a win form with a TextBox and Button, and I want to write some code in the TextBox, and when I click on the Button the code that written in the TextBox will executed.
someone got any idea or knoledge how to do so???
Thank you all.
推荐答案
是的,它有时被称为即时编译"和其他各种名称.
CP文章 [
Yes, it''s sometimes called "compiling on the fly" and various other names.
CP Article[^]
是的,为什么不呢? CodeDom允许您执行此操作.
检查基本示例:
http://www.codeproject.com/KB/dotnet/CompilingWithCodeDom.asp [ ^ ]
Yes why not. CodeDom allows you to do this.
Check the basic example :
http://www.codeproject.com/KB/dotnet/CompilingWithCodeDom.asp[^]
有一个看看此 [
Have a look at this[^] article on MSDN.
这篇关于从外部源执行代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文