I work with WCF.NET 3.5 SP1 and read that you DO NOT need to decorate your objects / collections with things like [DataMember], [DataConract] and / or [Serializable]? What is the best way? What are you facing?
I'm on 3.5 SP1.
See Using Data Contracts .
The new complex types that you create must have a data contract defined for them to be serializable. By default, it DataContractSerializerdisplays the data for the contract and serializes all publicly visible types. All public read / write properties and type fields are serialized. You can opt out of serialization by using IgnoreDataMemberAttribute. You can also explicitly create a data contract using DataContractAttributeand DataMemberAttribute. This is usually done by applying DataContractAttributethe type attribute. This attribute can be applied to classes, structures, and enumerations. The attribute DataMemberAttributeshould then be applied to each data member to indicate that it is a data member, that is, it should be serialized. For more information, see Serializable Types .
DataContractSerializer
IgnoreDataMemberAttribute
DataContractAttribute
DataMemberAttribute
@Terry, , , . , , , .
, DataContract. , , , - DataContract SP1...:)
Source: https://habr.com/ru/post/1711762/More articles:Custom XML serialization of unknown type - c #Authentication Processing with HttpWebRequest (.NET) - .netHow to list source versions using subversion - version-controlJSTL: check for property - conditionalCan an Oracle RECORD variable pass between procedures without procedures, knowing its real type? - oracleshouldStartLoadWithRequest не вызывается в моем приложении для iPhone - javascriptiPhone Webkit jQuery странность: невозможно обновить контент - javascriptWinforms UI Thread Marshalling List of BusinessObject updated from background thread - c #How to simulate the behavior of multiple instances of global variables inside an application in a static library, but using a DLL? - c ++Creating a variable not inherited in python - pythonAll Articles