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
name
Type: System.StringThe name of the promotion to remove.
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
Microsoft.SharePoint.Search.Extended.Administration.Keywords Namespace