I understand that we can have more controls for the class if we use datacontract, however, consider the following 2 cases
[DataContract] public class Customer { [DataMember] public string CustomerName {get; set;} [DataMember] public int Age{get; set;} }
and
public class Customer { public string CustomerName {get; set;} public int Age{get; set;} }
They both serialize correctly on the .net client. And personally, I do not use the second example. Can someone point me to the differences in the 2 classes? I wanted to send all public properties to both classes.
Yuan
source share