I m using the DataContractSerializer for storing an object of my own class to save user settings. The UserSettings class uses some other objects of different data types. I add all of those types to the KnownTypes parameter of the DataContractSerializer wich works just fine. But i ve got issues with forward compatibility. If i introduce a new property in the UserSerrings class using a new data type it also works in the new version of my program. But the old version throws an exception saying that the XML file cannot be deserialized because the data type is not in the KnownTypes array. I simply want to ignore those types because they re not used in the old version anyway. How can i achieve this, so that the old version can read and write the xml file ignoring those unknown properties/types?
What is the use of default keyword in C#? Is it introduced in C# 3.0 ?