Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

HtmlElementCollection Class

Defines a collection of HtmlElement objects.

System::Object
  System.Windows.Forms::HtmlElementCollection

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public ref class HtmlElementCollection sealed : ICollection, 
	IEnumerable

The HtmlElementCollection type exposes the following members.

  NameDescription
Public propertyCountGets the number of elements in the collection.
Public propertyItem[Int32]Gets an item from the collection by specifying its numerical index.
Public propertyItem[String]Gets an item from the collection by specifying its name.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetElementsByNameGets a collection of elements by their name.
Public methodGetEnumeratorReturns an enumerator that iterates through a collection.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public Extension MethodAsParallel()Overloaded. Enables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension MethodAsParallel()Overloaded. (Defined by ParallelEnumerable.)
Public Extension MethodAsQueryable()Overloaded. Converts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodAsQueryable()Overloaded. (Defined by Queryable.)
Public Extension MethodCast<TResult>()Overloaded. Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodCast<TResult>()Overloaded. (Defined by Enumerable.)
Public Extension MethodOfType<TResult>()Overloaded. Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Public Extension MethodOfType<TResult>()Overloaded. (Defined by Enumerable.)
Top

  NameDescription
Explicit interface implemetationPrivate methodICollection::CopyToInfrastructure. Copies the elements of the collection to an Array, starting at a particular Array index.
Explicit interface implemetationPrivate propertyICollection::IsSynchronizedGets a value indicating whether access to the HtmlElementCollection is synchronized (thread safe).
Explicit interface implemetationPrivate propertyICollection::SyncRootInfrastructure. Gets an object that can be used to synchronize access to the collection.
Top

The following code example uses HtmlElementCollection objects to print out a textual representation of the Document Object Model (DOM) of a page.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft