Compile like this:
gmcs Foo.cs Bar.cs
Run like this:
mono Foo.exe
I'm not sure about the VB compiler though.
The command line options for gmcs are similar to csc, but run gmcs -help
for details. The most obvious difference is that you use -flagName
instead of /flagName
:)
On Windows you can just run the .exe output files directly, of course. I think there's some way of associating them with mono on Linux, but I've never tried it myself.
Of course, there are bits of .NET which aren't present in Mono (and vice versa) - but if you're writing simple console apps (e.g. just to try LINQ to Objects queries etc) then it should be fine.