Class HTMLCollection
Class HTMLCollection
Namespace: Aspose.Html.Collections
Assembly: Aspose.HTML.dll (25.1.0)
Aspose.Html.Collections.HTMLCollection 表示 Aspose.Html.Dom.Element 的通用集合。
[ComVisible(true)]
[DOMName("HTMLCollection")]
[DOMObject]
public abstract class HTMLCollection : DOMObject, INotifyPropertyChanged, IEnumerable<element>, IEnumerable
继承
object ← DOMObject ← HTMLCollection
实现
INotifyPropertyChanged, IEnumerable<element>, IEnumerable
继承的成员
DOMObject.GetPlatformType(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
构造函数
HTMLCollection()
protected HTMLCollection()
属性
Length
列表中节点的数量。
[DOMName("length")]
public abstract int Length { get; }
属性值
this[int]
返回集合中索引为 index 的项。如果 index 大于或等于列表中的节点数量,则返回 null。
[DOMName("item")]
public abstract Element this[int index] { get; }
属性值
方法
GetEnumerator()
获取枚举器。
public abstract IEnumerator<element> GetEnumerator()
返回
IEnumerator<Element>
一个可以用于迭代集合的 System.Collections.IEnumerator 对象。
GetPlatformType()
此方法用于检索 ECMAScript 对象 System.Type。
public override Type GetPlatformType()
返回
ECMAScript 对象 System.Type。
NamedItem(string)
返回集合中与指定名称匹配的项。
[DOMName("namedItem")]
[DOMNullable]
public Element NamedItem(string name)
参数
name
string
元素名称。
返回
匹配的元素。
另请参阅
IEnumerable<t>, IEnumerable<t>, IDisposable