ConfigurationElementCollection.OnDeserializeUnrecognizedElement Method

Causes the configuration system to throw an exception.

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

protected override bool OnDeserializeUnrecognizedElement (
	string elementName,
	XmlReader reader
protected boolean OnDeserializeUnrecognizedElement (
	String elementName, 
	XmlReader reader
protected override function OnDeserializeUnrecognizedElement (
	elementName : String, 
	reader : XmlReader
) : boolean
Not applicable.



The name of the unrecognized element.


An input stream that reads XML from the configuration file.

Return Value

true if the unrecognized element was deserialized successfully; otherwise, false. The default is false.

Exception typeCondition


The element specified in elementName is the <clear> element.


elementName starts with the reserved prefix "config" or "lock".

The OnDeserializeUnrecognizedElement is called when an unrecognized configuration element is read from a configuration file.

Override this method to provide custom handling of unrecognized configuration elements from a configuration file. The default return value, false, causes the configuration system to throw an exception.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0