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?
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.
Fredrik has the correct answer. I'll only add that you should keep in mind that the client will never see your Data Contract. It will be translated into XML Schema and will be included in the WSDL. On the client side, recall, it could be a Perl or even Classic ASP client - something that has no concept of value vs. reference semantics.
So value vs. reference is something that only matters to the service - not to the clients.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With