Struct Cell
Single cell on a terminal.
public struct Cell : IEquatable<Cell>
- Implements
- Inherited Members
Remarks
Initializes a new instance of the Cell struct.
Constructors
Cell(Color, char, Color)
Single cell on a terminal.
public Cell(Color color = default, char glyph = '\0', Color charColor = default)
Parameters
colorColorThe background color of the cell.
glyphcharThe glyph in the cell.
charColorColorThe color of the cell's glyph.
Remarks
Initializes a new instance of the Cell struct.
Properties
Color
Gets or sets the background color of the cell.
public Color Color { readonly get; set; }
Property Value
Glyph
Gets or sets the glyph in the cell.
public char Glyph { readonly get; set; }
Property Value
GlyphColor
Gets or sets the color of the cell's glyph.
public Color GlyphColor { readonly get; set; }
Property Value
Methods
Equals(object)
Indicates whether this instance and a specified object are equal.
public override readonly bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
Equals(Cell)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(Cell other)
Parameters
otherCellAn object to compare with this object.
Returns
GetHashCode()
Returns the hash code for this instance.
public override readonly int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Operators
operator ==(Cell, Cell)
Compares two cells by value and returns whether they match.
public static bool operator ==(Cell c1, Cell c2)
Parameters
Returns
- bool
If all cell values are equal.
operator !=(Cell, Cell)
Compares two cells by value and returns whether they don't match.
public static bool operator !=(Cell c1, Cell c2)
Parameters
Returns
- bool
If any cell values are different.