Zhonghui

每个不曾起舞的日子,都是对生命的辜负

User Tools

Site Tools


程序:csharp:mono

Table of Contents

Mono


安装

Windows

Linux

sudo apt install mono-complete

编译C#代码

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
/var/www/DokuWikiStick/dokuwiki/data/pages/程序/csharp/mono.txt · Last modified: 2022/12/14 06:14 by zh