Console.BufferWidth Property

Gets or sets the width of the buffer area.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

static member BufferWidth : int with get, set

Property Value

Type: System.Int32
The current width, in columns, of the buffer area.


The value in a set operation is less than or equal to zero.


The value in a set operation is greater than or equal to Int16.MaxValue.


The value in a set operation is less than WindowLeft + WindowWidth.


The user does not have permission to perform this action.


An I/O error occurred.

If a set operation decreases the value of the BufferWidth property, the rightmost columns are removed. For example, if the number of columns is reduced from 80 to 60, columns 60 through 79 of each row are removed.

This example demonstrates the BufferHeight and BufferWidth properties. The example reports the dimensions of an operating system window set to a buffer size of 300 rows and 85 columns.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft