UserSegmentCollection.CreateUserSegment 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 CreateUserSegment ( _
    displayName As String, _
    description As String, _
    deleteIfUnused As Boolean _
) As UserSegment
'Usage
Dim instance As UserSegmentCollection
Dim displayName As String
Dim description As String
Dim deleteIfUnused As Boolean
Dim returnValue As UserSegment

returnValue = instance.CreateUserSegment(displayName, _
    description, deleteIfUnused)
public UserSegment CreateUserSegment(
    string displayName,
    string description,
    bool deleteIfUnused
)

Parameters

Return value

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

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

UserSegmentCollection class

UserSegmentCollection members

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