ConfigurationElementDeserializeElement Method
 

Reads XML from the configuration file.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

Syntax
protected internal virtual void DeserializeElement(
	XmlReader reader,
	bool serializeCollectionKey
)
public protected:
virtual void DeserializeElement(
	XmlReader^ reader,
	bool serializeCollectionKey
)
abstract DeserializeElement : 
        reader:XmlReader *
        serializeCollectionKey:bool -> unit
override DeserializeElement : 
        reader:XmlReader *
        serializeCollectionKey:bool -> unit
Protected Friend Overridable Sub DeserializeElement (
	reader As XmlReader,
	serializeCollectionKey As Boolean
)

Parameters

reader
Type:

The XmlReader that reads from the configuration file.

serializeCollectionKey
Type:

true to serialize only the collection key properties; otherwise, false.

Exceptions
Exception Condition
ConfigurationErrorsException

The element to read is locked.

- or -

An attribute of the current node is not recognized.

- or -

The lock status of the current node cannot be determined.

Examples

The following example demonstrates how to extend the DeserializeElement method.

protected override void DeserializeElement(
   System.Xml.XmlReader reader, 
    bool serializeCollectionKey)
{
    base.DeserializeElement(reader, 
        serializeCollectionKey);
    // You can your custom processing code here.
}
Protected Overrides Sub DeserializeElement(ByVal reader _
    As System.Xml.XmlReader, _
    ByVal serializeCollectionKey As Boolean)

    MyBase.DeserializeElement(reader, _
        serializeCollectionKey)
    ' Enter your custom processing code here.
End Sub 'DeserializeElement
Version Information
.NET Framework
Available since 2.0
Return to top