Partager via


ManagedPropertyCollection.Item, propriété (Microsoft.Office.Server.Search.Administration)

Gets the specified managed property from the collection of managed properties.

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

Syntaxe

'Déclaration
Public ReadOnly Default Property Item ( _
    name As String _
) As ManagedProperty
'Utilisation
Dim instance As ManagedPropertyCollection
Dim name As String
Dim value As ManagedProperty

value = instance(name)
public ManagedProperty this [
    string name
] { get; }

Paramètres

  • name
    A string that specifies the managed property name.

Valeur de la propriété

A ManagedProperty object that represents the managed property.

Exemple

The following code sample demonstrates how to use the Item property of the ManagedPropertyCollection class to retrieve a ManagedProperty object representing a specific managed property.

using Microsoft.SharePoint;
using Microsoft.Office.Server.Search.Administration;
…
Schema sspSchema = new Schema(SearchContext.GetContext(new SPSite("http://<SiteName>")));
ManagedPropertyCollection properties = sspSchema.AllManagedProperties;
ManagedProperty property = properties["<PropertyName>"];

Voir aussi

Référence

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