-
[2005] Modify Code
Is it possible to modify hardcode from my program?
Like make a textbox called Code and if you write:
if txtbox.text = "hello" then
msgbox("hi")
end if
it will run that code or delete another section like delete this:
if txtbox.text = "hello" then
end
end if
And replace it.
I want to make a program where u can modify the code i write.
-
Re: [2005] Modify Code
Yes..... and no..... Yes it's possible, but no, it's not that simple.
It involves building the code for an assembly in memory, passing it to the CodeDom and compiling it to either disk or in memory, then invoking the methods in the new assembly.
here's some resources I found using "executing dynamic code in .NET" in a search engine
http://www.west-wind.com/presentatio...ynamicCode.htm
http://www.codeproject.com/KB/dotnet...rget=scripting
http://support.xocomp.net/Protocol/d...uting_code.htm
-tg
-
Re: [2005] Modify Code
I dont think this is exactly what i was itending for those sites show how to run certain commands and code by a window which i forget the name..lol but anyway thats the window that displays the ????.writeline etc.. I wanted a user to be able to change the code by a program i make.