Can I serialize a BitArray to XML?
Posted
by SimonNet
on Stack Overflow
See other posts from Stack Overflow
or by SimonNet
Published on 2010-03-16T17:37:55Z
Indexed on
2010/03/16
17:41 UTC
Read the original article
Hit count: 241
Hello
I have a business class which I need to serialize to xml. It has a BitArray property.
I have decorated it with [XmlAttribute]
but the serialization is failing with
To be XML serializable, types which inherit from ICollection must have an implementation of Add(System.Boolean) at all levels of their inheritance hierarchy. System.Collections.BitArray does not implement Add(System.Boolean).
I am not sure whether its possible to serialize to xml?
If not what would be an efficient means of serializing the BitArray
Thanks for looking
© Stack Overflow or respective owner