是不是这个:Runtime C# Expression Evaluator
http://www.codeproject.com/csharp/runtime_eval.asp

解决方案 »

  1.   

    create dynamic assembly using System.CodeDom or System.Reflection.Emit
      

  2.   

    string strFileName;
          string strClass;
       
          Assembly asm = Assembly.LoadFrom(strFileName);
           oClass = asm.CreateInstance(strClass);
          tType = asm.GetType(strClass);
      

  3.   

    我还是不看不太懂我现在使用程序生成了 textbox_1,textbox_2,textbox_3,textbox_4我可不可以通过一个循环取出每一个 textbox_n 的 text 呢?比方说  for (int i=1;i<=4;i++)
    {
       lable1.text=lable1.text + ";" + textbox_i.text
    }但是很显然,花括号里面的语句是不正确的
    我想只知道怎样实现这个过程呢谢谢
      

  4.   

    .NET is strongly typed, do not expect things like eval which are usually associated with scripting languages to be applicable in .NETtryfor (int i=0; i < FormID.Controls.Count; i++)
    {
       if (FormID.Controls[i] is TextBox)
       {
               Label1.Text += ";" + ((TextBox)FormID.Controls[i]).Text
        }
    }
      

  5.   

    就怎么简单????????昏.............几乎所有的人都认为你问的是动态创建问题
        string[] strArray=new string[3];
        int i=0;
    foreach(Control c in this.Controls)
    {
     if(c.GetType()=="System.web.ui.webcontrol.textbox")
              strArray[i]=(TextBox)c).Text;
                   i++;
    }
    foreach(Control c in this.Controls)
    {
     if(c.GetType()=="System.web.ui.webcontrol.lable")
         ((lable)c).text=strArray[i];
           i++;
    }
      

  6.   

    多谢楼上的几位了,没办法最后还是综合了一下给位的方法用遍历 contral 的方法取得的