Share via


PromotionCollection.RemovePromotion Method

Removes a promotion from the promotion collection.

Namespace:  Microsoft.SharePoint.Search.Extended.Administration.Keywords
Assembly:  Microsoft.SharePoint.Search.Extended.Administration (in Microsoft.SharePoint.Search.Extended.Administration.dll)

Syntax

'Declaration
Function RemovePromotion ( _
    name As String _
) As Boolean
'Usage
Dim instance As PromotionCollection
Dim name As String
Dim returnValue As Boolean

returnValue = instance.RemovePromotion(name)
bool RemovePromotion(
    string name
)

Parameters

Return Value

Type: System.Boolean
[true] if the promotion was successfully removed; otherwise, [false].

Exceptions

Exception Condition
ArgumentNullException

The [name] is [null].

AdminException

The remove operation.fails. An example of a remove operation that will fail is trying to remove a promotion that does not exist in the the collection.

See Also

Reference

PromotionCollection Interface

PromotionCollection Members

Microsoft.SharePoint.Search.Extended.Administration.Keywords Namespace