DataProvider.CreateObject Method (Guid, Type)

Creates a new DDEX provider-implemented object, preferably tailored for the specified data source, and of the specified type.

Namespace:  Microsoft.VisualStudio.Data
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

'宣言
Public MustOverride Function CreateObject ( _
    dataSource As Guid, _
    objType As Type _
) As Object
'使用
Dim instance As DataProvider
Dim dataSource As Guid
Dim objType As Type
Dim returnValue As Object

returnValue = instance.CreateObject(dataSource, _
    objType)
public abstract Object CreateObject(
    Guid dataSource,
    Type objType
)
public:
virtual Object^ CreateObject(
    Guid dataSource, 
    Type^ objType
) abstract
public abstract function CreateObject(
    dataSource : Guid, 
    objType : Type
) : Object

Parameters

  • dataSource
    Type: System.Guid

    A DDEX data source GUID.

  • objType
    Type: System.Type

    Data type of the object to create.

Return Value

Type: System.Object

Returns a new DDEX provider-implemented object of the requested type.

Exceptions

Exception Condition
ArgumentNullException

The objType parameter is null.

Permissions

See Also

Reference

DataProvider Class

DataProvider Members

CreateObject Overload

Microsoft.VisualStudio.Data Namespace

SupportsObject