Class Console
Standard output stream.
Inheritance
System.Object
Console
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Cosmos.System
Assembly: Cosmos.System2.dll
Syntax
public class Console
Constructors
| Improve this Doc View SourceConsole(TextScreenBase)
Console object constructor.
Declaration
public Console(TextScreenBase textScreen)
Parameters
Type | Name | Description |
---|---|---|
TextScreenBase | textScreen | Output device. |
Fields
| Improve this Doc View SourcemText
Text screen.
Declaration
public TextScreenBase mText
Field Value
Type | Description |
---|---|
TextScreenBase |
mX
Cursor location on X axis.
Declaration
protected int mX
Field Value
Type | Description |
---|---|
System.Int32 |
mY
Cursor location on Y axis.
Declaration
protected int mY
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
| Improve this Doc View SourceBackground
Get and set console background color.
Declaration
public ConsoleColor Background { get; set; }
Property Value
Type | Description |
---|---|
System.ConsoleColor |
Cols
Get window width.
Declaration
public int Cols { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
CursorSize
Get and set cursor size. The value is percentage in the range 1-100.
Declaration
public int CursorSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when trying to set value out of range. |
CursorVisible
Get and set cursor visiblty.
Declaration
public bool CursorVisible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Foreground
Get and set console foreground color.
Declaration
public ConsoleColor Foreground { get; set; }
Property Value
Type | Description |
---|---|
System.ConsoleColor |
Rows
Get window height.
Declaration
public int Rows { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
X
Get and set cursor location on X axis.
Declaration
public int X { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Y
Get and set cursor location on Y axis.
Declaration
public int Y { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceClear()
Clear console and return cursor to (0,0).
Declaration
public void Clear()
UpdateCursor()
Update cursor position.
Declaration
protected void UpdateCursor()
Write(Byte)
Write char to the console.
Declaration
public void Write(byte aChar)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | aChar | A char to write |
Write(Byte[])
Write byte array to the console.
Declaration
public void Write(byte[] aText)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | aText | A byte array to write to the console. |