如何将 Clutter 与 C# 结合使用?

发布于 2024-12-10 04:31:14 字数 828 浏览 0 评论 0原文

我拼命尝试利用混乱(在 MonoDevelop IDE 中)制作一个非常简单的 C# 程序来证明功能,但我不熟悉 C# 约定。我是否需要构造一个杂乱对象然后引用它?我是否在我的图书馆中不当声明了它?我的命名空间应该是 Clutter 而不是 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;
        }
    }
}

I am desperately trying to make a very simple C# program utilizing clutter (In MonoDevelop IDE) to prove functionality but am unfamiliar with C# convention. Do I need to construct a clutter object to then reference it? Have I improperly declared it in my library? Should Clutter be my namespace rather than HelloWorld? Any help would be greatly appreciated.

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;
        }
    }
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝海似她心 2024-12-17 04:31:14

我假设 ClutterClutter 命名空间中的一个类

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;
        }
    }
}

I assume that the Clutter is a class in the Clutter namespace

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;
        }
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文