Partager via


ManagedPropertyCollection.Create, méthode (Microsoft.Office.Server.Search.Administration)

Adds a new managed property to the managed property collection.

Espace de noms : Microsoft.Office.Server.Search.Administration
Assembly : Microsoft.Office.Server.Search (dans microsoft.office.server.search.dll)

Syntaxe

'Déclaration
Public Function Create ( _
    name As String, _
    managedType As ManagedDataType _
) As ManagedProperty
'Utilisation
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
)

Paramètres

  • name
    A string that specifies the name for the managed property.
  • managedType
    A value from the ManagedDataType enumeration that specifies the data type for the managed property.

Valeur de retour

A ManagedProperty object that represents the managed property.

Remarques

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

For sample code using the Create method, see Procédure : créer une propriété gérée.

Voir aussi

Référence

ManagedPropertyCollection, classe
Membres ManagedPropertyCollection
Microsoft.Office.Server.Search.Administration, espace de noms