Creates a DDEX-provider implemented object of the given type that is specialized for the specified data source.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'宣言
Public Overridable Function CreateObject ( _
dataSource As Guid, _
objType As Type _
) As Object
'使用
Dim instance As DataSourceSpecializer
Dim dataSource As Guid
Dim objType As Type
Dim returnValue As Object
returnValue = instance.CreateObject(dataSource, _
objType)
public virtual Object CreateObject(
Guid dataSource,
Type objType
)
public:
virtual Object^ CreateObject(
Guid dataSource,
Type^ objType
)
public function CreateObject(
dataSource : Guid,
objType : Type
) : Object
Parameters
dataSource
Type: System.GuidGUID of the data source for which the provider is specialized.
objType
Type: System.TypeData type of the provider object.
Return Value
Type: System.Object
Returns a specialized object of specified type.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | The data source specified with the dataSource parameter is not a registered DDEX data source. |
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.