Exit() public method

public Exit ( int exitcode ) : void
exitcode int
return void
Example #1
0
        static void Main(string[] args)
        {
            try {
                lock (lockObject) {
                    if (application != null)
                        return;

                    // Fix process name not set on Unix
                    SetProcessName ("Tasque");
            #if WIN
                    application = new GtkWinApplication (args);
            #else
                    application = new GtkLinuxApplication (args);
            #endif
                }
            } catch (Exception e) {
                Logger.Debug ("Exception is: {0}", e);
                application.Exit (-1);
            } finally {
                lock (lockObject) {
                    if (application != null)
                        application.Dispose ();
                }
            }
        }