您的位置:首页 > 编程语言 > C#

c# - Start to compile and run mono c# code

2012-10-09 15:57 399 查看
Mono is some runtime that you can use on Linux  or other Unix box to compile/run C# code . Though I am not sure if I can directly run the code that is compiled by csc and run that that on mono, this is still up in the air for now.

to compile a source code to mono binaries, you can directly do this

msc Hellomono.cs
and to run the compiled output, you can directly do like this: 

mono Hellomono.exe

Below is one sample code that I used to test how to use the mono tools
using System;
public class Helloworld
{
public static void Main(string[] args)
{
Console.Out.WriteLine("Hello Mono");
}

}


the output is almost trivial, but it shows that the possibility to write the same code for both the Microsoft C# and the Mono C#.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐