Hello,
i would like to know weather it is possible to run code from a string
e.g
string code = MessageBox.Show("example");
//run the code?
Hello,
i would like to know weather it is possible to run code from a string
e.g
string code = MessageBox.Show("example");
//run the code?
how about system(code.c_str());
how about system(code.c_str());
???!! what's it??
Yes, what is that
Looks like somebody clicked on the wrong forum. And it would be a nonsensical, wrong answer even if it was in the right forum.
Write a compiler in your code, feed it the string "example" and it will run.(If your string has no compile errors in it of course)
Isnt Acient Dragons code in C++?
He means at runtime, right?
Yes run code at runtime
Look at this article http://www.codeproject.com/KB/codegen/Run-Time_Code_Generation1.aspx it may help you, or I recommend you to read in whole Microsoft.CSharp and System.CodeDom. namespaces.
thanks
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.