ProfilePropertySettingsCollection.OnDeserializeUnrecognizedElement Method

Definition

Handles the reading of unrecognized configuration elements from a configuration file and causes the configuration system to throw an exception if the element cannot be handled.

protected:
 override bool OnDeserializeUnrecognizedElement(System::String ^ elementName, System::Xml::XmlReader ^ reader);
protected override bool OnDeserializeUnrecognizedElement (string elementName, System.Xml.XmlReader reader);
override this.OnDeserializeUnrecognizedElement : string * System.Xml.XmlReader -> bool
Protected Overrides Function OnDeserializeUnrecognizedElement (elementName As String, reader As XmlReader) As Boolean

Parameters

elementName
String

The name of the unrecognized element.

reader
XmlReader

An input stream that reads XML from the configuration file.

Returns

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

Exceptions

elementName equals "clear"

-or-

elementName equals "group".

Remarks

This implementation of OnDeserializeUnrecognizedElement throws specialized errors if the element name is either "clear" or "group". After checking for these conditions, the method then explicitly calls its base implementation, the ConfigurationElementCollection.OnDeserializeUnrecognizedElement method.

Applies to