SPWebPartCollection.Contains Method
NOTE: This API is now obsolete.
Obsolete. Returns a Boolean value that indicates whether the specified Web Part is contained in the collection.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
<ObsoleteAttribute("Use SPLimitedWebPartManager instead.")> _
Public Function Contains ( _
webPart As WebPart _
) As Boolean
'Usage
Dim instance As SPWebPartCollection
Dim webPart As WebPart
Dim returnValue As Boolean
returnValue = instance.Contains(webPart)
[ObsoleteAttribute("Use SPLimitedWebPartManager instead.")]
public bool Contains(
WebPart webPart
)
Parameters
webPart
Type: Microsoft.SharePoint.WebPartPages.WebPartA Microsoft.SharePoint.WebPartPages.WebPart object that represents the Web Part.
Return Value
Type: System.Boolean
true if the collection contains the Web Part; otherwise, false.