870 {
871 global::Interop.Kernel32.CONSOLE_SCREEN_BUFFER_INFO bufferInfo =
GetBufferInfo();
872 global::Interop.Kernel32.SMALL_RECT srWindow = bufferInfo.srWindow;
873 int num = left + srWindow.Right - srWindow.Left;
874 if (left < 0 || num > bufferInfo.dwSize.X - 1 || num < left)
875 {
877 }
878 int num2 = top + srWindow.Bottom - srWindow.Top;
879 if (top < 0 || num2 > bufferInfo.dwSize.Y - 1 || num2 < top)
880 {
882 }
883 srWindow.Bottom = (
short)num2;
884 srWindow.Right = (
short)num;
885 srWindow.Left = (
short)left;
886 srWindow.Top = (
short)top;
887 if (!global::Interop.Kernel32.SetConsoleWindowInfo(
OutputHandle, absolute: true, &srWindow))
888 {
890 }
891 }
static IntPtr OutputHandle
static global::Interop.Kernel32.CONSOLE_SCREEN_BUFFER_INFO GetBufferInfo()
static Exception GetExceptionForWin32Error(int errorCode, string path="")
static int GetLastPInvokeError()
static string ArgumentOutOfRange_ConsoleWindowPos