1

機能を証明するために(MonoDevelop IDEで)クラッターを利用して非常に単純なC#プログラムを作成しようと必死になっていますが、C#の規則に慣れていません。クラッターオブジェクトを作成して参照する必要がありますか?ライブラリで不適切に宣言しましたか?クラッターはHelloWorldではなく私の名前空間にする必要がありますか?どんな助けでも大歓迎です。

using System;
using Clutter;

namespace HelloWorld {
    public class HelloWorld {
        public int Main () {            

            // Init declaration produces error: 
            // Expression denotes a 'type', where a 'method group' was expected
            Clutter.Init ();

            Stage stage = Stage.Default;
            stage.Color = new Clutter.Color (0, 0, 0, 255);
            stage.SetSize (512, 512);

            stage.Show ();

            // Main declaration produces error: 
            // Expression denotes a 'type', where a 'method group' was expected
            Clutter.Main ();

            return 0;
        }
    }
}
4

1 に答える 1

0

ClutterはClutter名前空間のクラスだと思います

using System;
using Clutter;

namespace HelloWorld {
    public class HelloWorld {
        public int Main () {            

            // Init declaration produces error: 
            // Expression denotes a 'type', where a 'method group' was expected
            Clutter c = new Clutter();
            c.Init();

            Stage stage = Stage.Default;
            stage.Color = new Clutter.Color (0, 0, 0, 255);
            stage.SetSize (512, 512);

            stage.Show();

            // Main declaration produces error: 
            // Expression denotes a 'type', where a 'method group' was expected
            c.Main();

            return 0;
        }
    }
}
于 2011-10-18T01:55:24.273 に答える