Execute string code in C#

Asked

Viewed 57 times

0

I’m a C# beginner and I built a code inside a string and I need it to be executed.

string MyString = "MyPictureBox.BackColor = Color.Red;";

I have found other similar questions (including apologies for this) but I have not yet succeeded... There is, in C#, how to do it simply?

  • 1

    See also: http://answall.com/q/109211/101

  • var engine = new Scriptengine(); engine. Execute(Mystring);

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.