Thursday, December 10, 2009

DataContracts vs XmlSerializer

Points

XmlSerializer

DataContracts

Control over Types

Strong

Loose

Optimization & Performance

Ok

Good by 10 times

Shows Serialized or not are serialized into XML

No

Yes

Translate

Public props

Regardless of the access modifiers

Restrictions

Hashtable that implement the IDictionary interface

No

Fully trusted code accesses all resources on your machine.

Not

DataContractSerializer being able to access the non-public members of a type is that it requires full trust

DataContractSerializer incorporates some support for versioning



http://msdn.microsoft.com/en-us/library/aa738737.aspx

No comments:

Post a Comment