DCSIMG
.net - itaysk

Browse by Tags

All Tags » .net (RSS)
If you try to serialize a class that has a public member of an interface type to xml file using the regular .net XmlSerializer , you will get an error: “Cannot serialize member {m} of type {t} because it is an interface.” ({m} and {t} are placeholders). In this post I suggest a workaround to this issue. Consider the following scenario: You have an object model like this: 1: public class Car 2: { 3: public string Model { get; set; } 4: public int Year { get; set; } 5: public IEngine Engine { get;...
2 comment(s)
תגים:,