Share via


ManagedPropertyCollection.Create Method

Adds a new managed property to the managed property collection.

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

Syntax

'Declaration
Public Function Create ( _
    name As String, _
    managedType As ManagedDataType _
) As ManagedProperty
'Usage
Dim instance As ManagedPropertyCollection
Dim name As String
Dim managedType As ManagedDataType
Dim returnValue As ManagedProperty

returnValue = instance.Create(name, managedType)
public ManagedProperty Create(
    string name,
    ManagedDataType managedType
)

Parameters

  • name
    Type: System.String
    A string that specifies the name for the managed property.

Return Value

Type: Microsoft.Office.Server.Search.Administration.ManagedProperty
A ManagedProperty object that represents the managed property.

Remarks

If a managed property with the same name already exists, the Create method throws an exception.

For sample code using the Create method, see How to: Create a Managed Property.

See Also

Reference

ManagedPropertyCollection Class

ManagedPropertyCollection Members

Microsoft.Office.Server.Search.Administration Namespace