C# Runtime Compilation(www.blackwasp.co.uk)

submitted by BlackWaspBlackWasp(4212) 8 months ago

The .NET framework includes classes that allow the code generator and compiler to be controlled from within an assembly. This allows C# source code, held in a string array, to be compiled at run time and executed using basic reflection techniques.

2 comments |category: |Views: 16

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by dpetersondpeterson(4397) 7 months, 29 days ago 0

It seems pretty cool, but do you have any examples of when it would be beneficial to perform runtime compilation? I could see it being useful for adding C# scripting to your applications, but it seems like Lua is a more popular choice in that scenario.

Reply

posted by BlackWaspBlackWasp(4212) 7 months, 29 days ago 0

I've used it where I've created code from diagrams and workflow but admittedly in that case I created DLLs, rather than compiling in memory. I wrote about it because I too find it pretty cool :D

Reply

information Login or create an account to comment on this story