Share via


SPUserCollection.Add Method

Adds the specified user to the collection.

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

Syntax

'Declaration
Public Sub Add ( _
    loginName As String, _
    email As String, _
    name As String, _
    notes As String _
)
'Usage
Dim instance As SPUserCollection
Dim loginName As String
Dim email As String
Dim name As String
Dim notes As String

instance.Add(loginName, email, name, notes)
public void Add(
    string loginName,
    string email,
    string name,
    string notes
)

Parameters

  • loginName
    Type: System.String

    A string that contains the user name (DOMAIN\alias) of the user.

  • email
    Type: System.String

    A string that contains the e-mail address of the user.

  • name
    Type: System.String

    A string that contains the display name of the user.

  • notes
    Type: System.String

    A string that contains notes about the user.

See Also

Reference

SPUserCollection Class

SPUserCollection Members

Microsoft.SharePoint Namespace