$ sudo apt-get install mono-runtime mono-gmcs
เมื่อติดตั้งเสร็จแล้ว ก็สามารถใช้งานได้ โดยลองเขียนโปรแกรม Hello, World ดู
using System;
class Hello {
public static void Main() {
Console.WriteLine("Hello, World");
}
}
ลอง compile ด้วยคำสั่ง gmcs จะได้ไฟล์ .exe สามารถทำงานได้
$ gmcs hello.cs
$ ./hello.exe Hello, World
ที่มา: How to Compile and Run C# .NET application on Ubuntu
No comments:
Post a Comment