0

I am curious as to if this is even possible. Is it possible to create a c# exe project with a rich text box that if I typed in for example

public void TestFunction(){
    MessageBox.Show("test");
};

that it would execute the code and build the function? I don't know if this makes sense. It was just one of those little questions that I had today and I don't know where to find the answer or what it is even called.

3
  • 1
    stackoverflow.com/questions/826398/… :):) Commented Apr 10, 2013 at 17:27
  • 1
    @ByteBlast Confused why you linked to exactly the same question I did, seven minutes later... O_o Commented Apr 10, 2013 at 17:30
  • That's what I was looking for! I just didn't know what to call it in order to find it. Thanks Guys! Commented Apr 10, 2013 at 17:30

3 Answers 3

1

ofc. it possible. See Reflection.Emit namespace

Sign up to request clarification or add additional context in comments.

Comments

0

So basically you want to write an interpreter and compiler.

Yeah those sort of things exist, that's how your code works.

Otherwise there are the Reflection classes built into C# which might work for some small stuff.

Comments

0

Certainly possible using reflection but it is a lot of hard work...

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.