Skip to content

Compiling and executing a code at runtime

mervan

Asked Oct 23, 2005, 1:51 PM EDT2 answers
Share
LinkedInX
Hi!
i want to write a program which can compile any enterd code by a user.
for example: the user will write his code in a textbox or another edit components
then i will compile it and return the result of his program.
so if any one about awaye to do that i will be so thanked for him

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Check with the following classes on .NET framework.

    1. CodeNamespace
    2. CodeCompileUnit
    3. CSharpCodeProvider
    4. System.CodeDom.Compiler.ICodeCompiler
    5. compiler.CompileAssemblyFromDom

    Using the combination of all these classes, we can generate a Code compilation modules. Please check these in MSDN and try implementing as per your need.

    Thanks,
    Shankar.
    0
  • 1 short reply