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

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

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

            IntPtr hwnd = (IntPtr)Convert.ToInt32(args[0]);

            // NOTE: The process name can be "chrome" || "iexplore" (IE) || "firefox" || "opera" || "applicationframehost" (Edge)
            string processName    = args[1];
            string screenshotPath = args[2];

            Bitmap screenshot = CaptureWindow(hwnd, processName);

            SaveBitmap(screenshot, screenshotPath);
        }