DataProvider.CreateObject 方法 (Type)

创建特定对象类型的一个DDEX提供程序的实现。

命名空间:  Microsoft.VisualStudio.Data
程序集:  Microsoft.VisualStudio.Data(在 Microsoft.VisualStudio.Data.dll 中)

语法

声明
Public Function CreateObject ( _
    objType As Type _
) As Object
public Object CreateObject(
    Type objType
)
public:
Object^ CreateObject(
    Type^ objType
)
member CreateObject : 
        objType:Type -> Object 
public function CreateObject(
    objType : Type
) : Object

参数

  • objType
    类型:System.Type
    要创建的对象的类型。

返回值

类型:System.Object
返回指定的对象类型。

异常

异常 条件
ArgumentNullException

objType 参数为 null。

备注

并非所有的DDEX提供程序需要支持所有文档的目标类型,因此,一些可能支持专用设计器或客户端使用的未记录的对象类型。

建议在调用此方法之前客户端首次调用 SupportsObject 方法检测特定目标类型是否支持。

.NET Framework 安全性

请参见

参考

DataProvider 类

CreateObject 重载

Microsoft.VisualStudio.Data 命名空间