Class HTMLCollection
Namespace: Aspose.Html.Collections
Assembly: Aspose.HTML.dll (25.1.0)
Aspose.Html.Collections.HTMLCollection reprezentuje ogólną kolekcję Aspose.Html.Dom.Element.
[ComVisible(true)]
[DOMName("HTMLCollection")]
[DOMObject]
public abstract class HTMLCollection : DOMObject, INotifyPropertyChanged, IEnumerable<element>, IEnumerable
Dziedziczenie
object ← DOMObject ← HTMLCollection
Implementuje
INotifyPropertyChanged, IEnumerable<element>, IEnumerable
Członkowie dziedziczeni
DOMObject.GetPlatformType(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Konstruktorzy
HTMLCollection()
protected HTMLCollection()
Właściwości
Length
Liczba węzłów na liście.
[DOMName("length")]
public abstract int Length { get; }
Wartość właściwości
this[int]
Zwraca element na indeksie w kolekcji. Jeśli indeks jest większy lub równy liczbie węzłów na liście, zwraca null.
[DOMName("item")]
public abstract Element this[int index] { get; }
Wartość właściwości
Metody
GetEnumerator()
Zwraca enumerator.
public abstract IEnumerator<element> GetEnumerator()
Zwraca
IEnumerator<Element>
Obiekt System.Collections.IEnumerator, który można wykorzystać do iteracji przez kolekcję.
GetPlatformType()
Ta metoda służy do pobierania obiektu ECMAScript System.Type.
public override Type GetPlatformType()
Zwraca
Obiekt ECMAScript System.Type.
NamedItem(string)
Zwraca element w kolekcji, który odpowiada podanej nazwie.
[DOMName("namedItem")]
[DOMNullable]
public Element NamedItem(string name)
Parametry
name
string
Nazwa elementu.
Zwraca
Dopasowany element
Zobacz także
IEnumerable<t>, IEnumerable<t>, IDisposable </t></t></element>