DataProvider.CreateObject Method (Type)

Creates a DDEX provider implementation of a specific object type.

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

Syntax

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

returnValue = instance.CreateObject(objType)
public Object CreateObject(
    Type objType
)
public:
Object^ CreateObject(
    Type^ objType
)
public function CreateObject(
    objType : Type
) : Object

Parameters

  • objType
    Type: System.Type

    The type of object to create.

Return Value

Type: System.Object

Returns the specified object type.

Exceptions

Exception Condition
ArgumentNullException

The objType parameter is null.

Remarks

Not all DDEX providers necessarily support all documented object types, and some may support undocumented object types that are used by specialized designers or clients.

It is recommended that before calling this method clients first call the SupportsObject method to detect whether a specific object type is supported.

Permissions

See Also

Reference

DataProvider Class

DataProvider Members

CreateObject Overload

Microsoft.VisualStudio.Data Namespace