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.

C#
protected override bool OnDeserializeUnrecognizedElement(string elementName, System.Xml.XmlReader reader);

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

Produit Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1