How to create/add code at run time and be able to save to the project?

Hi,

I have heard about creating/add code at run time.

My question:

1. How to do it?
2. At what situation will be needed.
3. Could it save to the project after it is executed.
4. Could we also delete procedure at runtime, logically is could be if we could add code to it.

Suppose I want to create controls at runtime, at run time after the "Create_Control" procedure is called, I want to delete then "Create_Control" procedure. But I still want all the controls I created still exist on that form after the form is close from running.

Thank you.


LVL 1
emi_sastraAsked:
Who is Participating?
 
RedKelvinConnect With a Mentor Commented:
ok take a look at this one, it is well explained
http://www.codeproject.com/vb/net/DotNetCompilerArticle.asp

Download the source example too, and give that a try
0
 
RedKelvinCommented:
Take a look at these
http://www.codeproject.com/useritems/VBRunNET.asp
http://www.codeproject.com/dotnet/evaluator.asp


I really can't think of a use for it, I had a colleague use it once, but the doco is incomplete, and it took a lot of time to get it going.

You will not be able to save the project after
0
 
emi_sastraAuthor Commented:
Hi,

I don't understand the info of the link.

Thank you.
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.