SimpleRoleProvider.DeleteRole(String, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Deletes the specified role.
public override bool DeleteRole (string roleName, bool throwOnPopulatedRole);
override this.DeleteRole : string * bool -> bool
Public Overrides Function DeleteRole (roleName As String, throwOnPopulatedRole As Boolean) As Boolean
Parameters
- roleName
- String
The name of the role to delete.
- throwOnPopulatedRole
- Boolean
true to cause an exception to be thrown if one or more users are in roleName
. In that case, the specified role is not deleted.
Returns
true if the role was deleted; otherwise, false.
Exceptions
roleName
has one or more members, and throwOnPopulatedRole
is true.