Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / June 2005

Tip: Looking for answers? Try searching our database.

Execute code from a text file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
André - 27 May 2005 01:38 GMT
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é
hammett - 27 May 2005 02:31 GMT
Have you looked at CodeDom?

Signature

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

> Hi,
> Can anyone tell me how I can run vb.net or C# code from a text document?
André - 27 May 2005 03:13 GMT
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

> Have you looked at CodeDom?
>
> > Hi,
> > Can anyone tell me how I can run vb.net or C# code from a text document?
hammett - 27 May 2005 22:15 GMT
Check this then
http://www.mvps.org/scripting/languages/

Signature

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

> No, but this looks interesting.   I think what i'm looking for is more
> like,
[quoted text clipped - 3 lines]
>
> if x=1 then do something
john conwell - 15 Jun 2005 17:37 GMT
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

> Check this then
> http://www.mvps.org/scripting/languages/
[quoted text clipped - 6 lines]
> >
> > if x=1 then do something

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.