Reputation: 7170
Suppose i write 'piece of code' in a text file. Is it possible to read that file at runtime and...execute ? For example, suppose my software have a method1, method2 and method3 methods. In a text file i write any simple piece of code, like:
dim i as integer
i = method1() + method2()
console.write(i)
How can execute it dinamically, at runtime ?
Upvotes: 0
Views: 167
Reputation: 19881
CodeDOMProvider and the System.CodeDom.Compiler Namespace is where you will want to start. But you will have to write more extensive code than your sample.
Upvotes: 2