CssNumberish Struct

The CSSNumberish typedef: (double or CSSNumericValue) (https://drafts.css-houdini.org/css-typed-om-1/#typedefdef-cssnumberish).

public readonly struct CssNumberish : IEquatable<CssNumberish>
Implements

Properties

NameDescription
ValueGets the value: a Double or a CssNumericValue.

Gets the value: a Double or a CssNumericValue.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(CssNumberish)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
FromCssNumericValue(CssNumericValue)Creates a CssNumberish from a CssNumericValue.
FromDouble(double)Creates a CssNumberish from a double.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(CssNumberish)

CssNumericValue.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(CssNumberish other)
Parameters
other CssNumberish
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

CssNumericValue.cs

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

FromCssNumericValue(CssNumericValue)

CssNumericValue.cs

Creates a CssNumberish from a CssNumericValue.

public static CssNumberish FromCssNumericValue(CssNumericValue value)

Parameters

value CssNumericValue

Returns

CssNumberish

FromDouble(double)

CssNumericValue.cs

Creates a CssNumberish from a double.

public static CssNumberish FromDouble(double value)

Parameters

value double

Returns

CssNumberish

GetHashCode()

CssNumericValue.cs

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.

Operators

NameDescription
operator ==(CssNumberish, CssNumberish)Determines whether two CssNumberish values are equal.
implicit operator CssNumberish(CssNumericValue)Converts a CssNumericValue to a CssNumberish.
implicit operator CssNumberish(double)Converts a double to a CssNumberish.
operator !=(CssNumberish, CssNumberish)Determines whether two CssNumberish values are not equal.

operator ==(CssNumberish, CssNumberish)

CssNumericValue.cs

Determines whether two CssNumberish values are equal.

public static bool operator ==(CssNumberish left, CssNumberish right)

Parameters

left CssNumberish
right CssNumberish

Returns

bool

op_Implicit overloads

implicit operator CssNumberish(CssNumericValue)

CssNumericValue.cs

Converts a CssNumericValue to a CssNumberish.

public static implicit operator CssNumberish(CssNumericValue value)
Parameters
value CssNumericValue
Returns

CssNumberish

implicit operator CssNumberish(double)

CssNumericValue.cs

Converts a double to a CssNumberish.

public static implicit operator CssNumberish(double value)
Parameters
value double
Returns

CssNumberish

operator !=(CssNumberish, CssNumberish)

CssNumericValue.cs

Determines whether two CssNumberish values are not equal.

public static bool operator !=(CssNumberish left, CssNumberish right)

Parameters

left CssNumberish
right CssNumberish

Returns

bool