HtmlCollectionOrElement Struct
The (HTMLCollection or Element) union returned by the named getters of HtmlAllCollection.
public readonly struct HtmlCollectionOrElement : IEquatable<HtmlCollectionOrElement>- Implements
Properties
| Name | Description |
|---|---|
| Element | Gets the value as an element, or null when it is a collection. |
| HtmlCollection | Gets the value as a collection, or null when it is an element. |
| Value | Gets the value: an HtmlCollection or an Element. |
Element
HtmlAllCollection.csHtmlCollection
HtmlAllCollection.csGets the value as a collection, or null when it is an element.
public HtmlCollection? HtmlCollection { get; }Property value
Value
HtmlAllCollection.csMethods
| Name | Description |
|---|---|
| Equals(HtmlCollectionOrElement) | 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. |
| FromElement(Element) | Creates a HtmlCollectionOrElement from a Element. |
| FromHtmlCollection(HtmlCollection) | Creates a HtmlCollectionOrElement from a HtmlCollection. |
| GetHashCode() | Returns the hash code for this instance. |
Equals overloads
Equals(HtmlCollectionOrElement)
HtmlAllCollection.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(HtmlCollectionOrElement other)Parameters
otherHtmlCollectionOrElement- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.
Equals(object?)
HtmlAllCollection.csFromElement(Element)
HtmlAllCollection.csCreates a HtmlCollectionOrElement from a Element.
public static HtmlCollectionOrElement FromElement(Element value)FromHtmlCollection(HtmlCollection)
HtmlAllCollection.csCreates a HtmlCollectionOrElement from a HtmlCollection.
public static HtmlCollectionOrElement FromHtmlCollection(HtmlCollection value)GetHashCode()
HtmlAllCollection.csOperators
| Name | Description |
|---|---|
| operator ==(HtmlCollectionOrElement, HtmlCollectionOrElement) | Determines whether two HtmlCollectionOrElement values are equal. |
| implicit operator HtmlCollectionOrElement(Element) | Converts a Element to a HtmlCollectionOrElement. |
| implicit operator HtmlCollectionOrElement(HtmlCollection) | Converts a HtmlCollection to a HtmlCollectionOrElement. |
| operator !=(HtmlCollectionOrElement, HtmlCollectionOrElement) | Determines whether two HtmlCollectionOrElement values are not equal. |
operator ==(HtmlCollectionOrElement, HtmlCollectionOrElement)
HtmlAllCollection.csDetermines whether two HtmlCollectionOrElement values are equal.
public static bool operator ==(HtmlCollectionOrElement left, HtmlCollectionOrElement right)op_Implicit overloads
implicit operator HtmlCollectionOrElement(Element)
HtmlAllCollection.csConverts a Element to a HtmlCollectionOrElement.
public static implicit operator HtmlCollectionOrElement(Element value)implicit operator HtmlCollectionOrElement(HtmlCollection)
HtmlAllCollection.csConverts a HtmlCollection to a HtmlCollectionOrElement.
public static implicit operator HtmlCollectionOrElement(HtmlCollection value)operator !=(HtmlCollectionOrElement, HtmlCollectionOrElement)
HtmlAllCollection.csDetermines whether two HtmlCollectionOrElement values are not equal.
public static bool operator !=(HtmlCollectionOrElement left, HtmlCollectionOrElement right)