// Create and fill in a multideminsional list with blank spaces. /// <summary> /// Consctructor class for the buffer. Pass in the width and height you want the buffer to be. /// </summary> /// <param name="Width"></param> /// <param name="Height"></param> public ConsoleBuffer(int Width, int Height, int wWidth, int wHeight) { if (Width > wWidth || Height > wHeight) { throw new System.ArgumentException("The buffer width and height can not be greater than the window width and height."); } h = CreateFile("CONOUT$", 0x40000000, 2, IntPtr.Zero, FileMode.Open, 0, IntPtr.Zero); width = Width; height = Height; windowWidth = wWidth; windowHeight = wHeight; buf = new CharInfo[width * height]; rect = new SmallRect(); rect.setDrawCord(0, 0); rect.setWindowSize((short)windowWidth, (short)windowHeight); Clear(); }