Ok, I\'m probably just having an epic fail here, but my mind wants to say this should work.
Assume DataProtect.DecryptData takes an encrypted string as input and a d
You can archive this with reflection as follows.
var tmp = DataProtect.deserializeXML(DataProtect.DecryptData(encrypted));
foreach (var property in GetType().GetProperties())
if (property.GetCustomAttributes(typeof (XmlIgnoreAttribute), false).GetLength(0) == 0)
property.SetValue(this, property.GetValue(tmp, null), null);
This assigns the deserialized object to a temporal variable, and copy the value in each public property to this
with reflection. This snippet avoids to copy properties with the XmlIgnore attribute.