如何将 Clutter 与 C# 结合使用?
我拼命尝试利用混乱(在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设 Clutter 是 Clutter 命名空间中的一个类
I assume that the Clutter is a class in the Clutter namespace