Redigera

Dela via


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.

public:
 WebPartDescriptionCollection();
public WebPartDescriptionCollection ();
Public Sub New ()

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

WebPartDescriptionCollection(ICollection)

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

public:
 WebPartDescriptionCollection(System::Collections::ICollection ^ webPartDescriptions);
public WebPartDescriptionCollection (System.Collections.ICollection webPartDescriptions);
new System.Web.UI.WebControls.WebParts.WebPartDescriptionCollection : System.Collections.ICollection -> System.Web.UI.WebControls.WebParts.WebPartDescriptionCollection
Public Sub New (webPartDescriptions As ICollection)

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