log4net SDK Reference |

# IConvertTo.ConvertTo Method

Converts the given value object to the specified type, using the arguments

[Visual Basic]
Function ConvertTo( _
ByVal source As Object, _
ByVal targetType As Type _
) As Object
[C#]
object ConvertTo(
object source,
Type targetType
);

#### Parameters

source
  the object to convert
targetType
  The Type to convert the value parameter to

#### Return Value

the converted object

#### Remarks

Converts the source (which must be of the type supported by this converter) to the targetType specified..

#### See Also

IConvertTo Interface | log4net.Util.TypeConverters Namespace