PromotionCollection.AddPromotion Method (String)

Creates a promotion and adds it to the collection.

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

Syntax

'Declaration
Function AddPromotion ( _
    name As String _
) As Promotion
'Usage
Dim instance As PromotionCollection
Dim name As String
Dim returnValue As Promotion

returnValue = instance.AddPromotion(name)
Promotion AddPromotion(
    string name
)

Parameters

Return Value

Type: Microsoft.SharePoint.Search.Extended.Administration.Keywords.Promotion
A Promotion representing the added promotion.

Exceptions

Exception Condition
ArgumentNullException

The [name] is [null].

AdminException

The add operation.fails. An example of an add operation that will fail is adding an already existing promotion to the collection.

See Also

Reference

PromotionCollection Interface

PromotionCollection Members

AddPromotion Overload

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