0
I have a string:
string str="for(int x = 0; x < 10; x++) Console.Write(\"hello\");"
How do I execute the instructions for this string?
for(int x = 0; x < 10; x++) Console.Write("hello");
0
I have a string:
string str="for(int x = 0; x < 10; x++) Console.Write(\"hello\");"
How do I execute the instructions for this string?
for(int x = 0; x < 10; x++) Console.Write("hello");
Browser other questions tagged c# .net eval
You are not signed in. Login or sign up in order to post.
This question has already been answered here and here I would suggest that you look at dynamiclinq source code on github which has there several examples where they compile and execute code next using Dynamic Expressions. here is an example
– ZeSousa
I put the
using System.CodeDom;
and theusing System.CodeDom.Compile
and yet the code is still missing references, it uses some other reference? I’m using . net 3.1 I think.– Thiago