I used the default .NET serialization for the class with a member of System.Drawing.Color. The code is now used by people, and I need to add an additional element to the class, but still deserialize the old versions.
So, I tried the standard way to do this: the ISerializable interface, using the SerializationInfo methods to get int and string elements.
Problem: my class also has a System.Drawing.Color member, but SerializationInfo does not provide a GetColor method to read this data type. I tried to get it as an int and as a string, and dropped it in System.Drawing.Color, but no luck.
Does anyone know how to deserialize System.Drawing.Color from SerializationInfo?
source
share