Share via


IVsDataProvider.TryCreateObject Method (Type)

Tries to create an instance of the specified DDEX support entity that is implemented by the DDEX provider.

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

Syntax

'Declaration
Function TryCreateObject ( _
    objType As Type _
) As Object
Object TryCreateObject(
    Type objType
)
Object^ TryCreateObject(
    Type^ objType
)
abstract TryCreateObject : 
        objType:Type -> Object
function TryCreateObject(
    objType : Type
) : Object

Parameters

  • objType
    Type: System.Type

    A type of DDEX support entity.

Return Value

Type: System.Object
An instance of the specified DDEX support entity that is implemented by the DDEX provider, if the DDEX provider supports it; otherwise, nulla null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
DataProviderException

Instantiation of a new instance of the support entity threw an exception, whether by way of a CreateInstance call through reflection or through the DDEX provider’s CreateObject method implementation, or creation of the default or client object implementation (if there is one) failed.

Remarks

This method delegates to the TryCreateObject method, passing Empty as the source parameter value.

.NET Framework Security

See Also

Reference

IVsDataProvider Interface

TryCreateObject Overload

Microsoft.VisualStudio.Data.Core Namespace