How to deserialize Nullable<bool>? [duplicate]
问题 This question already has answers here : Deserializing empty xml attribute value into nullable int property using XmlSerializer (4 answers) Closed 2 years ago . I am trying to deserialize a Nullable<bool> from my XML file. My expectation was that a XMLAttribute which was not found in my XMLElement is null and if it's found it will be true or false . Same for serialization. My variable will be written if it's not null. Anyways, everytime I'm trying to deserialize my XML an