ManagedPropertyCollection.Create Method
Adds a new managed property to the managed property collection.
Assembly: Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)
Parameters
- name
- Type: System.String
A string that specifies the name for the managed property.
- managedType
- Type: Microsoft.Office.Server.Search.Administration.ManagedDataType
A value from the ManagedDataType enumeration that specifies the data type for the managed property.
Return Value
Type: Microsoft.Office.Server.Search.Administration.ManagedPropertyA ManagedProperty object that represents the managed property.
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.