Should I make every object that I submit through the WCF service, [DataContract]?

I am trying to create a Framework Exception for my project. I know (and it’s convenient for me), marking my service objects as [DataContract] s and passing them back and forth. I have an Exception base class that inherits ISerializable and overwrites GetObjectData. Can I send this object through the WCF service in the same way that I can execute my DataContracts?

+4
source share
1 answer

ISerializable must be accurate if the field or property is a data member.

+1
source

Source: https://habr.com/ru/post/1388807/


All Articles