As many of you will be aware, I can use the DataContract
attribute to mark a class for serialization into XML in a WCF service.
For example, I can create a DataContract
thus:
< DataContract() > Public Class fooClass
< Datamember() > Public fooString as String
End Class
When I add a service reference to the code that will receive this DataContract, I see that the class generated by the designer has fooString as a public property with a backing field. My question is, why does the designer use a backing field? I don't see any reason not to access fooString directly.