共用方式為


SPUserCollection.Add method

將指定的使用者新增至集合。

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

Syntax

'宣告
Public Sub Add ( _
    loginName As String, _
    email As String, _
    name As String, _
    notes As String _
)
'用途
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
)

參數

  • loginName
    Type: System.String

    字串,包含使用者名稱 (DOMAIN\alias) 的使用者。

  • email
    Type: System.String

    字串,包含你的郵件地址的使用者。

  • name
    Type: System.String

    字串,包含使用者的顯示名稱。

  • notes
    Type: System.String

    字串,包含使用者的相關附註。

備註

如果使用者已經由loginName中的值,這個方法會更新現有的使用者資料。

請參閱

參照

SPUserCollection class

SPUserCollection members

Microsoft.SharePoint namespace