[OptionalField] prevents deserialization [SOLVED]
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Hi all, Adding an optional field to my class instantly prevents older versions from being deserialized:
\[OptionalField\] public Aurigma.GraphicsMill.Bitmap origStaticImage = null;
This is baffling; optional fields are supposed to PREVENT this! The [NonSerialized] attribute produces the same behavior. I have many other optional fields in this class that have been added over the years, and they work perfectly. If I remove the field, I can again deserialize older versions. Any suggestions how to get around this? Thanks! ==================== Solved it; an exception was being thrown in my RunAfterDeserialization method, making it appear that deserialization had failed. Doh!
"Microsoft -- Adding unnecessary complexity to your work since 1987!"