In wcf, what is the difference between applying the DataMember attribute on a property
DataMember
private int m_SomeValue; [DataMember] public int SomeVal
In general, you should favor applying the DataMember attribute on the property, rather than on the private field. The only reason to apply the attribute to the field instead is if the property were read-only (i.e. it has no setter).