An interesting "C# Script Engine" is available at www.csscript.net created by Oleg Shilo. It works fine on Linux Mono and it is possible to specify a magic line in scripts.
Original package contains too many different files, below is a minimal package with a few C# and VB.NET samples to run on linux. It should be extracted to the root of file system.
/etc/profile should contain:
Samples can be run as:
Use following magic line in your script files: