Should WCF DataContracts be value or reference types?

datacontract, wcf

Solution

As a rule of thumb; when designing a type yourself it should be a class, unless the type represents a single value, in which case it should be a struct.

Problem

You're at the service's end of the wire and you don't know your clients. Why would you choose one over the other?

Original source