Remove
This method removes a role from the roles list.
Declaration
// C#
public bool Remove(string Role);
Parameters
Role
- Role name to be removed from role list.
Return Value
A Boolean value indicating whether the specified role was removed from the list (true
) or not (false
).
Exceptions
ArgumentNullException - It is thrown when role name is provided as Null.
ArgumentException - It is thrown when role name is provided as empty string.
ArgumentException - It is thrown when case sensitive role name is not enclosed properly within double quotes.
InvalidOperationException - It is thrown when the connection is already open.
Remarks
A password-based role can also be removed from the collection by providing its name to the method.