I\'ve used the default .NET serialization for a class with a System.Drawing.Color member. The code is now in use by people, and I need to add an extra member to the class, but
I have used something like this in the past.
<Xml.Serialization.XmlIgnore()> Public BackColour As Drawing.Color
Public Property xmlBackColour() As Integer
Get
Return BackColour.ToArgb
End Get
Set(ByVal value As Integer)
BackColour = Drawing.Color.FromArgb(value)
End Set
End Property
Using ISerializable is not the recommended way to deal with versioning. The [OptionalField] is, the ins and outs are well described in this MSDN library article.
Answering your question: SerializationInfo.GetValue("fieldName", typeof(Color)) ought to give you the color. You'll need to cast the return value.