BrowserTools.FindWindow.Main C# (CSharp) Метод

Main() статический приватный Метод

static private Main ( string args ) : void
args string
Результат void
        static void Main(string[] args)
        {
            if (args.Length != 1) {
                Console.Error.Write("Incorrect arguments");
                Environment.Exit(1);
            }

            string windowMark = args[0];

            // NOTE: Repeat the attempt to find the window ten times with 300ms delay
            for (int i = 0; i < 10; i++) {
                EnumWindows(CheckWindowTitle, ref windowMark);
                Thread.Sleep(300);
            }

            Console.Error.Write("Window not found");
            Environment.Exit(1);
        }