Struct MessageBoxColor
public readonly struct MessageBoxColor : IEquatable<MessageBoxColor>, ISpanFormattable, IFormattable, IEqualityOperators<MessageBoxColor, MessageBoxColor, bool>
- Implements
- Inherited Members
Constructors
MessageBoxColor(byte, byte, byte)
public MessageBoxColor(byte r, byte g, byte b)
Parameters
Properties
B
public byte B { get; init; }
Property Value
G
public byte G { get; init; }
Property Value
R
public byte R { get; init; }
Property Value
Methods
Deconstruct(out byte, out byte, out byte)
public void Deconstruct(out byte r, out byte g, out byte b)
Parameters
Equals(MessageBoxColor)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(MessageBoxColor other)
Parameters
otherMessageBoxColorAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override 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.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
ToString(IFormatProvider?)
public string ToString(IFormatProvider? formatProvider)
Parameters
formatProviderIFormatProvider
Returns
ToString(string?)
public string ToString(string? format)
Parameters
formatstring
Returns
ToString(string?, IFormatProvider?)
Formats the value of the current instance using the specified format.
public string ToString(string? format, IFormatProvider? formatProvider)
Parameters
formatstringThe format to use.
-or-
A null reference (
Nothingin Visual Basic) to use the default format defined for the type of the IFormattable implementation.formatProviderIFormatProviderThe provider to use to format the value.
-or-
A null reference (
Nothingin Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.
Returns
- string
The value of the current instance in the specified format.
TryFormat(Span<char>, out int, ReadOnlySpan<char>, IFormatProvider?)
Tries to format the value of the current instance into the provided span of characters.
public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
Parameters
destinationSpan<char>The span in which to write this instance's value formatted as a span of characters.
charsWrittenintWhen this method returns, contains the number of characters that were written in
destination.formatReadOnlySpan<char>A span containing the characters that represent a standard or custom format string that defines the acceptable format for
destination.providerIFormatProviderAn optional object that supplies culture-specific formatting information for
destination.
Returns
Operators
operator ==(MessageBoxColor, MessageBoxColor)
Compares two values to determine equality.
public static bool operator ==(MessageBoxColor left, MessageBoxColor right)
Parameters
leftMessageBoxColorThe value to compare with
right.rightMessageBoxColorThe value to compare with
left.
Returns
implicit operator (byte r, byte g, byte b)(MessageBoxColor)
public static implicit operator (byte r, byte g, byte b)(MessageBoxColor color)
Parameters
colorMessageBoxColor
Returns
implicit operator MessageBoxColor((byte r, byte g, byte b))
public static implicit operator MessageBoxColor((byte r, byte g, byte b) color)
Parameters
Returns
operator !=(MessageBoxColor, MessageBoxColor)
Compares two values to determine inequality.
public static bool operator !=(MessageBoxColor left, MessageBoxColor right)
Parameters
leftMessageBoxColorThe value to compare with
right.rightMessageBoxColorThe value to compare with
left.