BooleanOrDoubleOrString Struct

The (boolean or unrestricted double or DOMString) union of the hidden IDL attribute.

public readonly struct BooleanOrDoubleOrString : IEquatable<BooleanOrDoubleOrString>
Implements

Properties

NameDescription
ValueGets the value: a Boolean, a Double or a String.

Gets the value: a Boolean, a Double or a String.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(BooleanOrDoubleOrString)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.
FromBoolean(bool)Creates a union value holding the given boolean.
FromDouble(double)Creates a union value holding the given number.
FromString(string)Creates a union value holding the given string.
GetHashCode()Returns the hash code for this instance.
ToString()Returns the fully qualified type name of this instance.

Equals overloads

Equals(BooleanOrDoubleOrString)

Mixins.cs

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

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

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

Equals(object?)

Mixins.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.

FromBoolean(bool)

Mixins.cs

Creates a union value holding the given boolean.

public static BooleanOrDoubleOrString FromBoolean(bool value)

Parameters

value bool

Returns

BooleanOrDoubleOrString

FromDouble(double)

Mixins.cs

Creates a union value holding the given number.

public static BooleanOrDoubleOrString FromDouble(double value)

Parameters

value double

Returns

BooleanOrDoubleOrString

FromString(string)

Mixins.cs

Creates a union value holding the given string.

public static BooleanOrDoubleOrString FromString(string value)

Parameters

value string

Returns

BooleanOrDoubleOrString

GetHashCode()

Mixins.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.

ToString()

Mixins.cs

Returns the fully qualified type name of this instance.

public override string? ToString()

Returns

string? The fully qualified type name.

Operators

NameDescription
operator ==(BooleanOrDoubleOrString, BooleanOrDoubleOrString)Returns whether the two union values hold equal values.
implicit operator BooleanOrDoubleOrString(bool)Converts a boolean to a union value.
implicit operator BooleanOrDoubleOrString(double)Converts a number to a union value.
implicit operator BooleanOrDoubleOrString(string)Converts a string to a union value.
operator !=(BooleanOrDoubleOrString, BooleanOrDoubleOrString)Returns whether the two union values hold different values.

operator ==(BooleanOrDoubleOrString, BooleanOrDoubleOrString)

Mixins.cs

Returns whether the two union values hold equal values.

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

op_Implicit overloads

implicit operator BooleanOrDoubleOrString(bool)

Mixins.cs

Converts a boolean to a union value.

public static implicit operator BooleanOrDoubleOrString(bool value)
Parameters
value bool
Returns

BooleanOrDoubleOrString

implicit operator BooleanOrDoubleOrString(double)

Mixins.cs

Converts a number to a union value.

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

BooleanOrDoubleOrString

implicit operator BooleanOrDoubleOrString(string)

Mixins.cs

Converts a string to a union value.

public static implicit operator BooleanOrDoubleOrString(string value)
Parameters
value string
Returns

BooleanOrDoubleOrString

operator !=(BooleanOrDoubleOrString, BooleanOrDoubleOrString)

Mixins.cs

Returns whether the two union values hold different values.

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