[DataMember]
- even if it's not public
visibleOrder=
attribute on the [DataMember]
[Serializable]
, but still use DataContractSerializer
to serialize that type? Sasuke vs gaara episode. Is it any different from serializing a [DataContract]
type with DataContractSerializer
?DataContractSerializer
, on the first serialization or deserialization episode, it 'shreds' the type to an internal structure that contains all the information about the type's members etc. It then uses the cached internal structure (preserved using dynamic IL) for subsequent serialization episodes, never going back to the original type.DataContractSerializer
's serialization of [Serializable]
types vs. XmlSerializer
's serialization of those same types, you will find DataContract
's serialization to be exponentially faster. A little bit of this is visible in the performance comparison whitepaper available here: http://msdn.microsoft.com/en-us/library/bb310550.aspx