メモ
http://mono-project.com/Mono_Basics
//using System; //using System.Windows.Forms; public class HelloWorld : System.Windows.Forms.Form { static public void Main () { System.Windows.Forms.Application.Run (new HelloWorld ()); } public HelloWorld () { Text = "Hello Mono World"; } }
using無しだとこうなる。
ビルドは、
$ gmcs hello.cs -pkg:dotnet
か
$ gmcs hello.cs -r:System.Windows.Forms
http://blogs.msdn.com/lukeh/archive/2007/04/03/a-ray-tracer-in-c-3-0.aspx
のコードもmonoでビルドできてそのままWindowsでも動いた。
Windowsで書かれたC#のコードでも-pkg:dotnetとかをつければビルドできるっぽい(gentooのmono-2.0.1)
リファレンスと適当なサンプルコードの在り処がわかれば便利な環境になりそう。