sudo apt install mono-complete
using System; using Math; namespace Application { class Application { static void Main() { System.Console.WriteLine("Hello: " + Common.Add(1, 1).ToString()); } } }
namespace Math { static class Common { public static int Add(int x,int y) { return x - y; } } }
编译命令(需要编译器在PATH里面)
mcs Main.cs Math.cs