Been spending some time on Codility.com recently and it crossed my mind; how do they execute the code you have created (Specifically pertaining to C# and VB.NET) ?
What I am basically wondering is how would I take a textbox on a form type some code in it and then run that code? Is this possible without 3rd party tools?
Also how would you prevent security violations specifically pertaining to a web based implementation of such a program?
Have a look at http://msdn.microsoft.com/en-us/library/system.codedom.compiler.aspx Executing such code in a web app is in deed a security problem. .Net provides a set of functionalities to help you solve that problem, like the possibility to run your compiled code in a different app domain as a different user.
With the CSharpCodeProvider class you can compile code (as a string) during runtime.
You can compile code in VB.Net and C# at runtime. Have a look at code to do that here