DataParameter.GetTypeFrom Method

Infers the data-source-specific parameter type from a parameter value.

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

Syntax

'宣言
Protected Overridable Function GetTypeFrom ( _
    value As Object _
) As String
'使用
Dim value As Object
Dim returnValue As String

returnValue = Me.GetTypeFrom(value)
protected virtual string GetTypeFrom(
    Object value
)
protected:
virtual String^ GetTypeFrom(
    Object^ value
)
protected function GetTypeFrom(
    value : Object
) : String

Parameters

Return Value

Type: System.String

Returns the data-source-specific type, or returns a null reference (Nothing in Visual Basic) if the value type is not supported.

Remarks

This method is called by the base implementation of the and OnValueChanged methods.

The OnValueChanging method calls this method to figure out if the value is of a valid type. The OnValueChanged method calls this method to set the type appropriately based on the new value (unless the type was explicitly set otherwise).

The base implementation of this method returns the .NET type name.

Permissions

See Also

Reference

DataParameter Class

DataParameter Members

Microsoft.VisualStudio.Data Namespace

GetTypeFrom