I want to remove custom security group from sharepoint 2010. I created custom security group as follows:
SPGroup wcmGroup = currentWeb.SiteGroups[permissionName];
SPRoleDefinition customRoleDefinition = currentWeb.RoleDefinitions[permissionName];
SPRoleAssignment roleAssignment = new SPRoleAssignment(wcmGroup);
roleAssignment.RoleDefinitionBindings.Add(customRoleDefinition);
currentWeb.RoleAssignments.Add(roleAssignment);
wcmGroup.Update();
currentWeb.Update();
However, I don't know how to remove the groups. Thanks.,