Share via


BestBetCollection.CreateBestBet method

Adds a best bet to the collection.

Namespace:  Microsoft.Office.Server.Search.Query.Rules
Assembly:  Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)

Syntax

'Declaration
Public Function CreateBestBet ( _
    title As String, _
    url As Uri, _
    description As String, _
    isVisualBestBet As Boolean, _
    deleteIfUnused As Boolean _
) As BestBet
'Usage
Dim instance As BestBetCollection
Dim title As String
Dim url As Uri
Dim description As String
Dim isVisualBestBet As Boolean
Dim deleteIfUnused As Boolean
Dim returnValue As BestBet

returnValue = instance.CreateBestBet(title, _
    url, description, isVisualBestBet, _
    deleteIfUnused)
public BestBet CreateBestBet(
    string title,
    Uri url,
    string description,
    bool isVisualBestBet,
    bool deleteIfUnused
)

Parameters

Return value

Type: Microsoft.Office.Server.Search.Query.Rules.BestBet

Exceptions

Exception Condition
NotSupportedException

Thrown when the collection is read only

ArgumentException

Thrown when the best bet already exists in the collection

See also

Reference

BestBetCollection class

BestBetCollection members

Microsoft.Office.Server.Search.Query.Rules namespace