Remove(String) Method

The Remove method of the AudienceCollection class removes the audience with the specified name from the collection.


AudienceName Audience name.


Exception Type Condition
AudienceInCompilationException Audience is in use and cannot be removed at this time.
AudienceNotExistException Audience with specified GUID does not exist in the database.
AudienceExecutionException Removal failed. The message for this exception contains an error code that specifies the reason the method failed.
UnauthorizedAccessException Current user only has read access rights on the current portal site and cannot remove an audience.


The Remove method fails if the user is not a member of the Administrator site group for the SharePoint site.


Platforms: Microsoft Windows Server 2003

Security: Code Access Security