I was just wondering if there are any good work-arounds for Deserializing private fields/properties using XmlSerializer.Deserialize() ?
Currently, I Deserialize my XML to a simple disposable type with all public properties, then I load the complex type that has private properties like this:
ComplexType complex = new ComplexType(SimpleType);
and the constructor of ComplexType looks like this:
public ComplexType(SimpleType simpleType){
this.Property1 = simpleType.Property1;
this.Property2 = simpleType.Property2;
.....
}
Anyone has a better way of doing this?