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 / New Users / June 2007

Tip: Looking for answers? Try searching our database.

Immediate Execution of Csharp Code?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Leon_Amirreza - 12 Jun 2007 17:04 GMT
Hi,
I want to let user type a line of C# code in a textbox and execute it.
How can I do that? I need something like interpreter of C# rather than its
compiler.

I considered using CSahrp and CodeDom namespaces but they seem not suitable
for my purpose because:

1- It needs a complete win forms or console C# App (I need just few lines of
code or a complete function to run immediately).
2- It should compile the C# app and gives an Assembly on disk; Its slow (can
It give the binary module in a memory mapped file for example? then how
should i load that module?).

And also ASP.Net doesnt suit because its called from web but I need to run
the C# code locally!
Laura T. - 12 Jun 2007 17:36 GMT
It *might* be easier than you think, but there are some gotchas.
Read this and meditate :-) :

http://msdn.microsoft.com/msdnmag/issues/02/09/cuttingedge/

> Hi,
> I want to let user type a line of C# code in a textbox and execute it.
[quoted text clipped - 12 lines]
> And also ASP.Net doesnt suit because its called from web but I need to run
> the C# code locally!

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.