SPFarmManagedAccountCollection.Contains Method
Determines whether the collection contains the specified managed account.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
<SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel := True)> _
Public Function Contains ( _
acct As SPManagedAccount _
) As Boolean
'Usage
Dim instance As SPFarmManagedAccountCollection
Dim acct As SPManagedAccount
Dim returnValue As Boolean
returnValue = instance.Contains(acct)
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel = true)]
public bool Contains(
SPManagedAccount acct
)
Parameters
acct
Type: Microsoft.SharePoint.Administration.SPManagedAccountThe managed account.
Return Value
Type: System.Boolean
true if the collection contains acct; otherwise, false.
Implements
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | acct is null . |
Remarks
This method checks whether the name of the managed account is in the collection.
See Also
Reference
SPFarmManagedAccountCollection Class