how to execute the .cs file  generated using codeDom
Here is my source code.....

    using System;
    using System.CodeDom;
    using System.CodeDom.Compiler;
    using System.Reflection;
    using System.IO;
    using Microsoft.CSharp;
    using Microsoft.VisualBasic;
    namespace CodeDOM     
    {
     class Program
     {     
        private string m_strFileName;	
        private string m_Suffix = ".cs";
      public Program(string FileName)
      {
          m_strFileName = FileName;
      }
      public void CreateCodeDom()
      {
          Stream codeFile = File.Open("c:\\" + m_strFileName + m_Suffix, FileMode.Create);
          StreamWriter sw = new StreamWriter(codeFile);
          CSharpCodeProvider cscp = new CSharpCodeProvider();                 
          ICodeGenerator codeGenerator = cscp.CreateGenerator(sw);
          CodeGeneratorOptions cgo = new CodeGeneratorOptions();
          CodeSnippetCompileUnit cscu = new CodeSnippetCompileUnit("imports System");
          codeGenerator.GenerateCodeFromCompileUnit(cscu, sw, cgo);
          CodeNamespace cnsCodeDom = new CodeNamespace("SampleNamespace");
          CodeTypeDeclaration clsDecl = new CodeTypeDeclaration();
          clsDecl.Name = "Sample";
          clsDecl.IsClass = true;
          clsDecl.TypeAttributes = TypeAttributes.Public;
          cnsCodeDom.Types.Add(clsDecl);
          CodeConstructor clsConstructor = new CodeConstructor();
          clsConstructor.Attributes = MemberAttributes.Public;
          clsDecl.Members.Add(clsConstructor);
          CodeMemberField clsMember = new CodeMemberField();
          clsMember.Name = "myname";
          clsMember.Attributes = MemberAttributes.Private;
          clsMember.Type = new CodeTypeReference("System.String");
          clsDecl.Members.Add(clsMember);
          CodeMemberProperty property = new CodeMemberProperty();
          property.Name = "MyName";
          property.Type = new CodeTypeReference("System.String");
          property.Attributes = MemberAttributes.Public;          
          property.HasGet = true;
          property.GetStatements.Add(new CodeSnippetExpression("return this.myname"));
          property.HasSet = true;
          property.SetStatements.Add(new CodeSnippetExpression("this.myname=value"));
          //property.GetStatements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "this.myname")));
          //property.SetStatements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "this.myname"), new CodePropertySetValueReferenceExpression()));
          clsDecl.Members.Add(property);
          CodeMemberMethod mtd = new CodeMemberMethod();
          mtd.Name = "Print";
          mtd.ReturnType = null;
          mtd.Attributes = MemberAttributes.Public;
          mtd.Statements.Add(new CodeSnippetStatement("Console.WriteLine(myname)"));
          clsDecl.Members.Add(mtd);
          codeGenerator.GenerateCodeFromNamespace(cnsCodeDom, sw, cgo);
          sw.Close();
          codeFile.Close();
      }        
       static void Main(string[] args)
       {
           Program m_obj = new Program("Sample");
           m_obj.CreateCodeDom();
           Console.ReadLine();
       }
    }
}



from this i got sample.cs file.now i want to execute that sample.cs file.wil u plz suggest me how to do it?
how to execute the .cs file  generated using codeDom
===

Here is my source code.....

    using System;
    using System.CodeDom;
    using System.CodeDom.Compiler;
    using System.Reflection;
    using System.IO;
    using Microsoft.CSharp;
    using Microsoft.VisualBasic;
    namespace CodeDOM     
    {
     class Program
     {     
        private string m_strFileName;	
        private string m_Suffix = ".cs";
      public Program(string FileName)
      {
          m_strFileName = FileName;
      }
      public void CreateCodeDom()
      {
          Stream codeFile = File.Open("c:\\" + m_strFileName + m_Suffix, FileMode.Create);
          StreamWriter sw = new StreamWriter(codeFile);
          CSharpCodeProvider cscp = new CSharpCodeProvider();                 
          ICodeGenerator codeGenerator = cscp.CreateGenerator(sw);
          CodeGeneratorOptions cgo = new CodeGeneratorOptions();
          CodeSnippetCompileUnit cscu = new CodeSnippetCompileUnit("imports System");
          codeGenerator.GenerateCodeFromCompileUnit(cscu, sw, cgo);
          CodeNamespace cnsCodeDom = new CodeNamespace("SampleNamespace");
          CodeTypeDeclaration clsDecl = new CodeTypeDeclaration();
          clsDecl.Name = "Sample";
          clsDecl.IsClass = true;
          clsDecl.TypeAttributes = TypeAttributes.Public;
          cnsCodeDom.Types.Add(clsDecl);
          CodeConstructor clsConstructor = new CodeConstructor();
          clsConstructor.Attributes = MemberAttributes.Public;
          clsDecl.Members.Add(clsConstructor);
          CodeMemberField clsMember = new CodeMemberField();
          clsMember.Name = "myname";
          clsMember.Attributes = MemberAttributes.Private;
          clsMember.Type = new CodeTypeReference("System.String");
          clsDecl.Members.Add(clsMember);
          CodeMemberProperty property = new CodeMemberProperty();
          property.Name = "MyName";
          property.Type = new CodeTypeReference("System.String");
          property.Attributes = MemberAttributes.Public;          
          property.HasGet = true;
          property.GetStatements.Add(new CodeSnippetExpression("return this.myname"));
          property.HasSet = true;
          property.SetStatements.Add(new CodeSnippetExpression("this.myname=value"));
          //property.GetStatements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "this.myname")));
          //property.SetStatements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "this.myname"), new CodePropertySetValueReferenceExpression()));
          clsDecl.Members.Add(property);
          CodeMemberMethod mtd = new CodeMemberMethod();
          mtd.Name = "Print";
          mtd.ReturnType = null;
          mtd.Attributes = MemberAttributes.Public;
          mtd.Statements.Add(new CodeSnippetStatement("Console.WriteLine(myname)"));
          clsDecl.Members.Add(mtd);
          codeGenerator.GenerateCodeFromNamespace(cnsCodeDom, sw, cgo);
          sw.Close();
          codeFile.Close();
      }        
       static void Main(string[] args)
       {
           Program m_obj = new Program("Sample");
           m_obj.CreateCodeDom();
           Console.ReadLine();
       }
    }
}



from this i got sample.cs file.now i want to execute that sample.cs file.wil u plz suggest me how to do it?