SimpleRoleProvider.DeleteRole(String, Boolean) Method

Definition

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.

Applies to