英語で読む 編集

次の方法で共有


ConfigurationElement.OnDeserializeUnrecognizedElement Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Gets a value indicating whether an unknown element is encountered during deserialization.

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

Parameters

elementName
String

The name of the unknown subelement.

reader
XmlReader

The XmlReader being used for deserialization.

Returns

true when an unknown element is encountered while deserializing; otherwise, false.

Exceptions

The element identified by elementName is locked.

-or-

One or more of the element's attributes is locked.

-or-

elementName is unrecognized, or the element has an unrecognized attribute.

-or-

The element has a Boolean attribute with an invalid value.

-or-

An attempt was made to deserialize a property more than once.

-or-

An attempt was made to deserialize a property that is not a valid member of the element.

-or-

The element cannot contain a CDATA or text element.

Remarks

The OnDeserializeUnrecognizedElement is invoked when an unknown attribute is encountered while deserializing the ConfigurationElement object.

Applies to

製品 バージョン
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.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
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10