Share via


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

Return value

Type: System.Boolean
true if the collection contains acct; otherwise, false.

Implements

ICollection<T>.Contains(T)

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

SPFarmManagedAccountCollection members

Microsoft.SharePoint.Administration namespace