XmlHierarchyConfigurator SetParameter Method | Apache log4net™ SDK Documentation

Sets a parameter on an object.

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

C#
VB
C++
F#
Copy

    protected void SetParameter(
    	XmlElement element,
    	Object target
    )

    Protected Sub SetParameter (
    	element As XmlElement,
    	target As Object
    )

    protected:
    void SetParameter(
    	XmlElement^ element,
    	Object^ target
    )

    member SetParameter :
            element : XmlElement *
            target : Object -> unit

#### Parameters

element
  Type: System.Xml
  XmlElement
  The parameter element.
target
  Type: System
  Object
  The object to set the parameter on.

Remarks

The parameter name must correspond to a writable property on the object. The value of the parameter is a string, therefore this function will attempt to set a string property first. If unable to set a string property it will inspect the property and its argument type. It will attempt to call a static method called Parse on the type of the property. This method will take a single string argument and return a value that can be used to set the property.
See Also

#### Reference

XmlHierarchyConfigurator Class
log4net.Repository.Hierarchy Namespace