VS.net creates a template when you create a WCF project.
It adds a class to the iService1.cs file:
// Use a data contract as illustrated in the sampl
Perhaps not often used, we could use [DataContract] to pass through private variables. The DataContractSerializer will serialize/deserialize only publicly visible types if [DataContract] attribute is not used.
[DataContract]
public class SampleClass
{
[DataMember]
private int MyPrivateProperty { get; set; }
}
(Note: If you are generating a proxy then private members are exposed as public)