Visual Guard Class Library Documentation

VGRoleProvider.AddUsersToRoles Method 

Adds the specified users to the specified roles.

public override void AddUsersToRoles(
   String[] usernames,
   String[] roleNames
);

Parameters

usernames
A string array of user names to add to the specified roles.
roleNames
A string array of roles to add the specified user name to.

Exceptions

Exception Type Condition
ArgumentNullException One of the roles in roleNames is null.

-or-

One of the users in usernames is null.
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.

See Also

VGRoleProvider Class | Novalys.VisualGuard.Security.WebForm Namespace