Ubuntu Mono 运行 Helloworld

Ubuntu Mono 运行 Helloworld

ref:

http://www.mono-project.com/docs/getting-started/install/linux/#usage

http://www.mono-project.com/docs/getting-started/

Install mono

运行下面代码授权注册repo源并更新软件列表:


sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list sudo apt-get update

Install mono:


sudo apt-get install mono-complete

helloworld

class HelloMono
{
public static void Main(string[ ] args)
{
System.Console.WriteLine("Hello Mono");
}
}

编译:

mcs hw.cs

运行:

mono hw.exe

上一篇:spring data jpa入门学习


下一篇:Python之路 day2 字符串/元组/列表/字典互转