i have a class that i have serialized to disk on local users machines. I need to refactor this class and i changed all objects (anything except enums, string, numbers) to interfaces. Underneath it is still the same concrete class. my concern is breaking existing users persistance
From:
public class Foo
{
public double Count;
public State MyState;
}
To
public class IFoo
{
public double Count;
public IState MyState;
}
but now i am getting errors from the serialization code that says "can't serialize because its an interface"
the error states:
"There was an error reflecting type 'Foo'." "Cannot serialize member 'Foo.My' of type 'IState', see inner exception for more details."
what is the best way around this?