SPFarmManagedAccountCollection.Contains method
Determines whether the collection contains the specified managed account.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
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