Share via


Contains Method

The Contains method of the SPWebPartCollection class returns a Boolean value that indicates whether the specified Web Part is contained in the collection.

Parameters

webPart   A Microsoft.SharePoint.WebPartPages.WebPart object that represents the Web Part.

Return Value

true if the collection contains the Web Part; otherwise, false.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security