Share via


SPRoleAssignment constructor (String, String, String, String)

Initializes a new instance of the SPRoleAssignment class that has no role definition bindings for the specified user.

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

Syntax

'Declaration
Public Sub New ( _
    LoginName As String, _
    Email As String, _
    Name As String, _
    Notes As String _
)
'Usage
Dim LoginName As String
Dim Email As String
Dim Name As String
Dim Notes As String

Dim instance As New SPRoleAssignment(LoginName, _
    Email, Name, Notes)
public SPRoleAssignment(
    string LoginName,
    string Email,
    string Name,
    string Notes
)

Parameters

  • LoginName
    Type: System.String

    The name of the user in the format DOMAIN\User_Alias.

Remarks

This constructor creates a new entry in the SPPrincipal collection if the user does not already exist in the site collection.

See also

Reference

SPRoleAssignment class

SPRoleAssignment members

SPRoleAssignment overload

Microsoft.SharePoint namespace