WebPartDescriptionCollection Constructors

Definition

Initializes a new instance of the WebPartDescriptionCollection class.

Overloads

WebPartDescriptionCollection()

Initializes an empty new instance of the WebPartDescriptionCollection class.

WebPartDescriptionCollection(ICollection)

Initializes a new instance of a WebPartDescriptionCollection object by passing in an ICollection collection of WebPartDescription objects.

WebPartDescriptionCollection()

Initializes an empty new instance of the WebPartDescriptionCollection class.

C#
public WebPartDescriptionCollection();

Remarks

This overload of the WebPartDescriptionCollection constructor can be used to create an empty collection. For example, the ImportCatalogPart control creates an empty WebPartDescriptionCollection object if the content of an imported description file is null.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

WebPartDescriptionCollection(ICollection)

Initializes a new instance of a WebPartDescriptionCollection object by passing in an ICollection collection of WebPartDescription objects.

C#
public WebPartDescriptionCollection(System.Collections.ICollection webPartDescriptions);

Parameters

webPartDescriptions
ICollection

A collection of WebPartDescription objects that correspond to the WebPart controls in a catalog.

Exceptions

webPartDescriptions is null.

A member of webPartDescriptions is null

-or-

A member of webPartDescriptions is not an object of type WebPartDescription

-or-

A member of webPartDescriptions has a duplicate ID property.

Remarks

The WebPartDescriptionCollection(ICollection) constructor is used by the GetAvailableWebPartDescriptions method implementations within the various CatalogPart controls to create a collection of WebPartDescription objects.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1