xtd 0.2.0
Loading...
Searching...
No Matches

◆ buffer_width() [2/2]

static void xtd::console::buffer_width ( int32  width)
static

Sets the width of the buffer area.

Parameters
widthThe current width, in columns, of the buffer area.
Exceptions
xtd::argument_out_of_range_exceptionThe value in a set operation is less than or equal to zero.
-or-
The value in a set operation is greater than or equal to xtd::int16_object::max_value.
Examples
This example demonstrates the BufferHeight and buffer_width properties. The example reports the dimensions of an operating system window set to a buffer size of 300 rows and 85 columns.
#include <xtd/console>
using namespace xtd;
auto main() -> int {
console::write_line("The current buffer height is {} rows.", console::buffer_height());
console::write_line("The current buffer width is {} columns.", console::buffer_width());
}
// This code produces the following output :
//
// The current buffer height is 300 rows.
// The current buffer width is 85 columns.
static int32 buffer_height()
Gets the height of the buffer area.
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
static int32 buffer_width()
Gets the width of the buffer area.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10