Share via


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)

Syntax

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

value = instance(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