CssStyleValueOrString Struct

The (CSSStyleValue or USVString) union of StylePropertyMap.Set and StylePropertyMap.Append.

public readonly struct CssStyleValueOrString : IEquatable<CssStyleValueOrString>
Implements

Properties

NameDescription
ValueGets the value: a CssStyleValue or a String.

Gets the value: a CssStyleValue or a String.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(CssStyleValueOrString)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.
FromCssStyleValue(CssStyleValue)Creates a CssStyleValueOrString from a CssStyleValue.
FromString(string)Creates a CssStyleValueOrString from a string.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(CssStyleValueOrString)

StylePropertyMap.cs

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

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

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

Equals(object?)

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

FromCssStyleValue(CssStyleValue)

StylePropertyMap.cs

Creates a CssStyleValueOrString from a CssStyleValue.

public static CssStyleValueOrString FromCssStyleValue(CssStyleValue value)

Parameters

value CssStyleValue

Returns

CssStyleValueOrString

FromString(string)

StylePropertyMap.cs

Creates a CssStyleValueOrString from a string.

public static CssStyleValueOrString FromString(string value)

Parameters

value string

Returns

CssStyleValueOrString

GetHashCode()

StylePropertyMap.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 ==(CssStyleValueOrString, CssStyleValueOrString)Determines whether two CssStyleValueOrString values are equal.
implicit operator CssStyleValueOrString(CssStyleValue)Converts a CssStyleValue to a CssStyleValueOrString.
implicit operator CssStyleValueOrString(string)Converts a string to a CssStyleValueOrString.
operator !=(CssStyleValueOrString, CssStyleValueOrString)Determines whether two CssStyleValueOrString values are not equal.

operator ==(CssStyleValueOrString, CssStyleValueOrString)

StylePropertyMap.cs

Determines whether two CssStyleValueOrString values are equal.

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

op_Implicit overloads

implicit operator CssStyleValueOrString(CssStyleValue)

StylePropertyMap.cs

Converts a CssStyleValue to a CssStyleValueOrString.

public static implicit operator CssStyleValueOrString(CssStyleValue value)
Parameters
value CssStyleValue
Returns

CssStyleValueOrString

implicit operator CssStyleValueOrString(string)

StylePropertyMap.cs

Converts a string to a CssStyleValueOrString.

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

CssStyleValueOrString

operator !=(CssStyleValueOrString, CssStyleValueOrString)

StylePropertyMap.cs

Determines whether two CssStyleValueOrString values are not equal.

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