jermny
jermny

Reputation: 880

Do I have to make every object I send through a WCF service a [DataContract]?

I am trying to build an Exception Framework for my project. I know (and am comfortable) with marking my service objects as [DataContract]s and passing them back and forth. I have an Exception base class which inherits ISerializable and overwrites the GetObjectData. Can I send that object through a WCF service the same way I can do my DataContracts?

Upvotes: 4

Views: 170

Answers (1)

devlife
devlife

Reputation: 16145

ISerializable should be fine as long as the field or property is a data member.

Upvotes: 1

Related Questions