XmlHierarchyConfigurator ConvertStringTo Method | Apache log4net™ SDK Documentation

Converts a string value to a target type.

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

C#
VB
C++
F#
Copy

    protected Object ConvertStringTo(
    	Type type,
    	string value
    )

    Protected Function ConvertStringTo (
    	type As Type,
    	value As String
    ) As Object

    protected:
    Object^ ConvertStringTo(
    	Type^ type,
    	String^ value
    )

    member ConvertStringTo :
            type : Type *
            value : string -> Object

#### Parameters

type
  Type: System
  Type
  The type of object to convert the string to.
value
  Type: System
  String
  The string value to use as the value of the object.

#### Return Value

Type: Object

An object of type type with value value or null when the conversion could not be performed.

See Also

#### Reference

XmlHierarchyConfigurator Class
log4net.Repository.Hierarchy Namespace