Show / Hide Table of Contents

Class NamedColor

A color associated with a name.

Inheritance
object
NamedColor
Implements
IEquatable<NamedColor>
Inherited Members
object.GetType()
object.MemberwiseClone()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: SadConsole.UI
Assembly: SadConsole.dll
Syntax
public record NamedColor : IEquatable<NamedColor>

Constructors

NamedColor(NamedColor)

Declaration
protected NamedColor(NamedColor original)
Parameters
Type Name Description
NamedColor original

NamedColor(string, Color)

A color associated with a name.

Declaration
public NamedColor(string Name, Color Color)
Parameters
Type Name Description
string Name

The name of the color.

Color Color

The color.

Properties

Color

The color.

Declaration
public Color Color { get; init; }
Property Value
Type Description
Color

EqualityContract

Declaration
protected virtual Type EqualityContract { get; }
Property Value
Type Description
Type

Name

The name of the color.

Declaration
public string Name { get; init; }
Property Value
Type Description
string

Methods

Deconstruct(out string, out Color)

Declaration
public void Deconstruct(out string Name, out Color Color)
Parameters
Type Name Description
string Name
Color Color

Equals(NamedColor?)

Declaration
public virtual bool Equals(NamedColor? other)
Parameters
Type Name Description
NamedColor other
Returns
Type Description
bool

Equals(object?)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
object.Equals(object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
object.GetHashCode()

PrintMembers(StringBuilder)

Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
Type Name Description
StringBuilder builder
Returns
Type Description
bool

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

<Clone>$()

Declaration
public virtual NamedColor <Clone>$()
Returns
Type Description
NamedColor

Operators

operator ==(NamedColor?, NamedColor?)

Declaration
public static bool operator ==(NamedColor? left, NamedColor? right)
Parameters
Type Name Description
NamedColor left
NamedColor right
Returns
Type Description
bool

operator !=(NamedColor?, NamedColor?)

Declaration
public static bool operator !=(NamedColor? left, NamedColor? right)
Parameters
Type Name Description
NamedColor left
NamedColor right
Returns
Type Description
bool

Implements

IEquatable<T>

Extension Methods

ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX