SPUserCollection.Item Property (String)

Gets the user object with the specified user name from the collection. In C#, this property is an indexer for the SPUserCollection class.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public ReadOnly Property Item ( _
    loginName As String _
) As SPUser
    Get
'Usage
Dim instance As SPUserCollection
Dim loginName As String
Dim value As SPUser

value = instance.Item(loginName)
public SPUser this[
    string loginName
] { get; }

Parameters

  • loginName
    Type: System.String

    A string that contains the user name.

Property Value

Type: Microsoft.SharePoint.SPUser
A Microsoft.SharePoint.SPUser object that represents the user.

See Also

Reference

SPUserCollection Class

SPUserCollection Members

Item Overload

Microsoft.SharePoint Namespace