Mono编译/运行.NET应用程序简单示例

1.运行Console Application

using System;
using System.Collections;
using System.Collections.Generic;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
        }
    }

}

C:\Program Files\Mono-2.10.2\bin>gmcs Program.cs
C:\Program Files\Mono-2.10.2\bin>mono Program.exe
Hello World!

2.运行ASP.NET

C:\Program Files\Mono-2.10.2\bin>xsp2 --root f:\www
xsp2
Listening on address: 0.0.0.0
Root directory: f:\www
Listening on port: 8080 (non-secure)
Hit Return to stop the server.

以上测试使用Mono 2.10.2 for Windows。

评论: 0 | 引用: 0 | 查看次数: 5308
发表评论
登录后再发表评论!