Something wrong with this gtk# class for a window?
Learning C#, I feel so guilty for loving it. I'm a microsoft hater. Anyways I'm trying out gtk# and just trying out some simple stuff. I've made a class for the main window and MonoDevelop is complaining about this code, which I swear was just fine a second ago.
public class mwin
{
protected Window win = new Window("test progr开发者_运维知识库am--");
public mwin()
{
//Configure the parts
win.SetDefaultSize(300,500);
}
public void showWin()
{
win.ShowAll();
}
}
win.SetDefaultSize(300,500);
}--<(here it says "} expected")
But obviously I have a closing brace! Am I missing something?
[edit] here's whole code. The color stuff was some stuff I was playing around with to color the window, but I didn't finish because the error started. I'm sure it's not the color stuff because it still has an error when I comment them out. http://codepaste.net/b2mwys
You have put your call to "win.SetDefaultSize(300,500);" outside of a method block. The compiler is expecting a closing brace.
精彩评论