求一个string语句的写法...
我想动态生成一个string的语句:
frmEmployee frm=new frm;
frm.show();
其中 frmEmployee是用参数传进去的,请问这个string 的语名怎么写?
===========================下面的方法可以执行组合的string源码======================================
private void method_test(string ACode)
{
ICodeCompiler vCodeCompiler = new CSharpCodeProvider().CreateCompiler();
CompilerParameters vCompilerParameters = new CompilerParameters();
vCompilerParameters.GenerateExecutable = false;
vCompilerParameters.GenerateInMemory = true;
vCompilerParameters.ReferencedAssemblies.Add( "System.Windows.Forms.dll ");
string vSource =
"using System.Windows.Forms;\n " +
"public class Temp\n " +
"{\n " +
" public void Test()\n " +
" {\n " +
" " + ACode + "\n " +
" }\n " +
"}\n ";
CompilerResults vCompilerResults =
vCodeCompiler.CompileAssemblyFromSource(vCompilerParameters, vSource);
Assembly vAssembly = vCompilerResults.CompiledAssembly;
object vTemp = vAssembly.CreateInstance( "Temp ");
&nbs