ExitWithError() публичный статический Метод

public static ExitWithError ( string title, string text, bool exit = true ) : void
title string
text string
exit bool
Результат void
Пример #1
0
        private static void LoadImage(string file, string name)
        {
            Image image = null;

            if (!File.Exists(file))
            {
                MainForm.ExitWithError("Fatal Error", String.Format("Could not find image {0}", file));
            }
            image = Image.FromFile(file);
            if (image == null)
            {
                MainForm.ExitWithError("Fatal Error", String.Format("Failed to load image {0}", file));
            }
            images.Add(name.ToLower(), image);
        }