ManagedPropertyCollection.Create 方法 (Microsoft.Office.Server.Search.Administration)

Adds a new managed property to the managed property collection.

命名空间: Microsoft.Office.Server.Search.Administration
程序集: Microsoft.Office.Server.Search (在 microsoft.office.server.search.dll 中)

语法

声明
Public Function Create ( _
    name As String, _
    managedType As ManagedDataType _
) As ManagedProperty
用法
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
)

参数

  • 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.

返回值

A 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 如何:创建托管属性.

另请参阅

参考

ManagedPropertyCollection 类
ManagedPropertyCollection 成员
Microsoft.Office.Server.Search.Administration 命名空间