创建指定的DDEX的实例支持由DDEX提供程序实现的指定DDEX数据源的实体。
命名空间: Microsoft.VisualStudio.Data.Core
程序集: Microsoft.VisualStudio.Data.Core(在 Microsoft.VisualStudio.Data.Core.dll 中)
语法
声明
Function CreateObject ( _
source As Guid, _
objType As Type _
) As Object
Object CreateObject(
Guid source,
Type objType
)
Object^ CreateObject(
Guid source,
Type^ objType
)
abstract CreateObject :
source:Guid *
objType:Type -> Object
function CreateObject(
source : Guid,
objType : Type
) : Object
参数
- source
类型:System.Guid
DDEX数据源中没有特定的数据源的标识符或 Empty。
- objType
类型:System.Type
DDEX的类型支持实体。
返回值
类型:System.Object
指定的DDEX的实例支持由DDEX提供程序实现的指定DDEX数据源的实体。
异常
异常 | 条件 |
---|---|
DataProviderException | DDEX提供程序不支持对实体,或支持实体的新实例的实例引发了异常,还是 CreateInstance 的方式调用通过反射或通过DDEX提供程序的 CreateObject 方法失败的默认值或客户端对象的实现的实现或创建(如果有)。 |
备注
CreateObject 方法的此方法委托,通过 Object 作为 TSite 泛型参数值和 nullnull 引用(在 Visual Basic 中为 Nothing) 作为 site 参数。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。