共用方式為


SPGroup.AddUser method (String, String, String, String)

加入指定的特定使用者名稱、 電子郵件地址、 顯示名稱和備忘稿到群組的使用者。

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

Syntax

'宣告
Public Sub AddUser ( _
    loginName As String, _
    email As String, _
    name As String, _
    notes As String _
)
'用途
Dim instance As SPGroup
Dim loginName As String
Dim email As String
Dim name As String
Dim notes As String

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

參數

  • loginName
    Type: System.String

    要加入使用者的使用者名稱 (DOMAIN\User_Alias) 群組。

  • email
    Type: System.String

    要加入使用者的電子郵件地址給群組。

  • name
    Type: System.String

    要加入使用者的顯示名稱群組。

  • notes
    Type: System.String

    備忘稿,要新增使用者至群組。

請參閱

參照

SPGroup class

SPGroup members

AddUser overload

Microsoft.SharePoint namespace