OptionConverter ConvertTypeTo Method | Apache log4net™ SDK Documentation

Converts an object 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 Object ConvertTypeTo(
    	Object sourceInstance,
    	Type targetType
    )

    Public Shared Function ConvertTypeTo (
    	sourceInstance As Object,
    	targetType As Type
    ) As Object

    public:
    static Object^ ConvertTypeTo(
    	Object^ sourceInstance,
    	Type^ targetType
    )

    static member ConvertTypeTo :
            sourceInstance : Object *
            targetType : Type -> Object

#### Parameters

sourceInstance
  Type: System
  Object
  The object to convert to the target type.
targetType
  Type: System
  Type
  The type to convert to.

#### Return Value

Type: Object
The converted object.
Remarks

Converts an object to the target type.

See Also

#### Reference

OptionConverter Class
log4net.Util Namespace