In wcf, what is the difference between applying the DataMember attribute on a property
DataMember
private int m_SomeValue; [DataMember] public int SomeVal
If add [DataMember] on private int m_SomeValue, this member can not be serialization,so must be add it on public int SomeValue.
[DataMember] private int m_SomeValue; public int SomeValue { get {...} set {...} }
the code of above can not be get value in the client if you use it through WCF.