Didn't Mono implement something like this ages ago? And I mean ages ago, before C# even had standardized code outside "static void Main" in the language spec, IIRC they had an interpreter that probably used Reflection.Emit or something and executed the output and you could #! it.