all groups > dotnet clr > may 2005 >
You're in the

dotnet clr

group:

Execute code from a text file


Execute code from a text file André
5/26/2005 5:38:01 PM
dotnet clr:
Hi,
Can anyone tell me how I can run vb.net or C# code from a text document?

I want to have a smart client (compiled) and I want that smart client to
write to a text file and execute the code from that file.

I’ve seen an example of this somewhere; I think you have to bring in a
namespace to compile that code at runtime.

If someone can show me a Hello world app that would be great.

Thanks,

André
Re: Execute code from a text file André
5/26/2005 7:13:04 PM
No, but this looks interesting. I think what i'm looking for is more like,
i'll click a button, and the app runs the code in a file.

I want to be able to run code like this:

if x=1 then do something

but I want to be able to make it dynamic, adding another if statement when
ever i want. I would want to run the code like a database stored procedure
and be able to alter the code when I want.

Is this Codedom what I’m looking for?

tks


[quoted text, click to view]
Re: Execute code from a text file hammett
5/26/2005 10:31:08 PM
Have you looked at CodeDom?

--
Cheers,
hammett
http://www.castleproject.org/~hammett

[quoted text, click to view]

Re: Execute code from a text file hammett
5/27/2005 6:15:15 PM
Check this then
http://www.mvps.org/scripting/languages/


--
Cheers,
hammett
http://www.castleproject.org/~hammett

[quoted text, click to view]

Re: Execute code from a text file john conwell
6/15/2005 9:37:55 AM
Not to pinp my own articles, BUT i've got an example of using the CodeDom to
execute code from a text document.

http://www.codeproject.com/dotnet/DotNetScript.asp


[quoted text, click to view]
AddThis Social Bookmark Button