Constructors Not Called On Deserialization
问题 Various places I've been reading have pointed out that on deserialization, the .NET Framework makes a call to FormatterServices.GetUninitializedObject, in which constructors are not called and field initializers are not set. If this is true, why is my constructor being called? Are there instances where constructors and field initializers could be called? My Class: [DataContract] public class TestClass { [DataMember] public string Val1 { get; set; } [DataMember] public string Val2 { get; set;