Share via


SPFarmManagedAccountCollection.Item Property

Gets the SPManagedAccount object that matches the user name.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public ReadOnly Default Property Item ( _
    username As String _
) As SPManagedAccount
    Get
'Usage
Dim instance As SPFarmManagedAccountCollection
Dim username As String
Dim value As SPManagedAccount

value = instance(username)
public SPManagedAccount this[
    string username
] { get; }

Parameters

Property Value

Type: Microsoft.SharePoint.Administration.SPManagedAccount
Returns the SPManagedAccount object that matches the user name. Returns a null reference (Nothing in Visual Basic) if no match is found.

See Also

Reference

SPFarmManagedAccountCollection Class

SPFarmManagedAccountCollection Members

Microsoft.SharePoint.Administration Namespace