本文介绍了请帮助:动态声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 大家好,希望有人能告诉你是否有办法动态,建立一个声明,然后调用一些 函数来执行该语句。我知道例子总是 帮助,所以这就是我要完成的事情: 将myStatement作为字符串调整 myStatement =" ;昏暗的结果为整数结果= 2 * 3" 现在有什么方法可以让程序将 myStatement视为一个判断并因此执行什么 vb代码在里面? 期待收到您的回复。 TANXHi everyone, hope someone can tell if there is any way to,dynamically, build an statement and then call somefunctions to execute the statement. I know examples alwayshelp, so here what I am trying to accomplish:Dim myStatement as StringmyStatement = "Dim result as integer result= 2 * 3"now is there any way to actually let a program to treatmyStatement as a statment and therefore execute whatevervb code is in it?Looking forward to hearing from you. TANX推荐答案 字符串本身无法执行。申请必须满足一些最低 的要求才能编制。 您可以查看CodeDom: http://msdn.microsoft.com/library /en...elanguages.asp - Armin http://learn.to/quoteThe string itself can not be executed. An application must meet some minimumrequirements in order to be compilable.You might have a look at CodeDom: http://msdn.microsoft.com/library/en...elanguages.asp--Armin http://learn.to/quote 最低要求才能编译。 您可以查看CodeDom: http://msdn.microsoft.com/library /en...elanguages.asp Armin http://learn.to/quote 我知道他想要执行输入的行。 可执行程序与可执行程序的区别在哪里?由于他想要执行该行,我认为这是一个要执行的短程序。 - Armin http://learn.to/quoteI understood he wants to execute the entered line. Where is the differenceto an "executable program"? As he wants to execute the line, I think it is akind of a short program to be executed.--Armin http://learn.to/quote 这篇关于请帮助:动态声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!