How i can exit my game before loading stuff in constructor?
Throw an exception. Don't allow the constructor to complete and return a semi-initialized object.
Application.Exit() only works in WinForms applications (i.e. GLControl) and won't have any effect on GameWindow apps.
What kind of exception should i throw?
When i throw an exceptions, Visual Studio catch this exception, but i want exit game..
The exact exception depends on why you wish to exit the game. For example, NotSupportedException might be a good match if the hardware doesn't meet the minimum requirements of your game.
You can catch the exception yourself in the Main method and either exit silently or display an error message to the user (e.g. "Your hardware does not meet the minimum requirements"). The exact approach also depends on why you wish to exit the game.
File not found exceptions, because, in constructor i load 3d model..
joo.. very thank :)
Site design by Stefanos A. Icons courtesy of gnome-colors.