Remove(System.Guid) Method
The Remove method of the AudienceCollection class removes the Audience object with the specified globally unique identifier (GUID) from the collection.
Parameters
AudienceGuid GUID for an audience.
Exceptions
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. |
Remarks
The Remove method fails if the user is not a member of the Administrator site group.
Requirements
Platforms: Microsoft Windows Server 2003
Security: Code Access Security