Adds the specified users to the specified roles.
Namespace:
Novalys.VisualGuard.Security.WebFormAssembly: Novalys.VisualGuard.Security.WebForm (in Novalys.VisualGuard.Security.WebForm.dll) Version: 3.2.912.1 (3.2.912.01)
Syntax
C# |
---|
public override void AddUsersToRoles( string[] usernames, string[] roleNames ) |
Visual Basic (Declaration) |
---|
Public Overrides Sub AddUsersToRoles ( _ usernames As String(), _ roleNames As String() _ ) |
Parameters
- usernames
- Type: array<
System..::.String
>[]()[]
A string array of user names to add to the specified roles.
- roleNames
- Type: array<
System..::.String
>[]()[]
A string array of roles to add the specified user name to.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentNullException | One of the roles in roleNames is null.
-or- One of the users in usernames is null. |
System..::.ArgumentException | One of the roles in roleNames is an empty string or contains a comma (,).
-or- roleNames contains a duplicate element.-or-usernames contains a duplicate element. |