Open MauNguyenVan opened 10 months ago
The documentation refers to Formatters that use this ISerializable interface - formatters like BinaryFormatter and SoapFormatter. The inclusion of terms like "Xml serialization" in the introduction is a little misleading... but I don't see anywhere in that documentation that specifically references XmlSerializer
.
If you need control over the format of data with XmlSerializer
, then IXmlSerializable
is the interface for that.
Description
The documentation for ISerializable claims that this interface applies to both binary and XML serialization. In actual fact, the XML Serializer completely ignores this interface. It is actually do nothing with implement of ISerializable and may be binary serialization have the same issuse.
Reproduction Steps
Use .NET 8.0 code from ms docs
Expected behavior
Actual behavior
Regression?
Use .NET 8.0
Known Workarounds
No response
Configuration
No response
Other information
No response