Checks if there is an appropriate type conversion from the source type to the target type.
Namespace: log4net.UtilAssembly: log4net (in log4net.dll) Version: 1.2.15.0 (1.2.15.0)
public static bool CanConvertTypeTo(
Type sourceType,
Type targetType
)
public static bool CanConvertTypeTo(
Type sourceType,
Type targetType
)
Public Shared Function CanConvertTypeTo (
sourceType As Type,
targetType As Type
) As Boolean
Public Shared Function CanConvertTypeTo (
sourceType As Type,
targetType As Type
) As Boolean
public:
static bool CanConvertTypeTo(
Type^ sourceType,
Type^ targetType
)
public:
static bool CanConvertTypeTo(
Type^ sourceType,
Type^ targetType
)
Parameters
- sourceType
- Type: System Type
The type to convert from.
- targetType
- Type: System Type
The type to convert to.
Return Value
Type:
Booleantrue if there is a conversion from the source type to the target type.
Checks if there is an appropriate type conversion from the source type to the target type.