Share via


SPUserCollection.Add method

Adds the specified user to the collection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

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 thee-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.

Remarks

If the user identified by the value in loginName already exists, this method updates the existing user data.

See also

Reference

SPUserCollection class

SPUserCollection members

Microsoft.SharePoint namespace