StdPaint.ConsoleBuffer.Clear C# (CSharp) Method

Clear() public method

Clears all units in the buffer, optionally specifying a color to fill the buffer with.
public Clear ( BufferColor color = BufferColor.Black ) : void
color BufferColor The color to fill the buffer with.
return void
        public unsafe void Clear(BufferColor color = BufferColor.Black)
        {
            fixed (BufferUnitInfo* b = _buffer)
            {
                for (int i = UnitCount; i >= 0; i--)
                {
                    b[i].BackColor = color;
                    b[i].ForeColor = color;
                    b[i].CharData = '\0';
                }
            }
        }