OptionConverter CanConvertTypeTo Method | Apache log4net™ SDK Documentation

Checks if there is an appropriate type conversion from the source type to the target type.

Namespace: log4net.Util
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public static bool CanConvertTypeTo(
    	Type sourceType,
    	Type targetType
    )

    Public Shared Function CanConvertTypeTo (
    	sourceType As Type,
    	targetType As Type
    ) As Boolean

    public:
    static bool CanConvertTypeTo(
    	Type^ sourceType,
    	Type^ targetType
    )

    static member CanConvertTypeTo :
            sourceType : Type *
            targetType : Type -> bool

#### Parameters

sourceType
  Type: System
  Type
  The type to convert from.
targetType
  Type: System
  Type
  The type to convert to.

#### Return Value

Type: Boolean
true if there is a conversion from the source type to the target type.
Remarks

Checks if there is an appropriate type conversion from the source type to the target type.

See Also

#### Reference

OptionConverter Class
log4net.Util Namespace