I’ve run the following command in the Ubuntu terminal –
sudo apt-get install mono-develop
Now how can I run *.vb and *.cs programs using the terminal – What is the command that need to be given?
Does the syntax vary when we write code in Windows & Linux environment?
Compile like this:
Run like this:
I’m not sure about the VB compiler though.
The command line options for gmcs are similar to csc, but run
gmcs -helpfor details. The most obvious difference is that you use-flagNameinstead 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.