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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

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