Reputation: 16565
Can anyone please elabortae me the reasons why should I use Data Contract Serializer while we have XML/Binary serializer already there in .Net ?
Upvotes: 1
Views: 558
Reputation: 71591
One more HUGE advantage; DataContract serialization allows for interop between any two classes that implement the same DataContract. This is what allows WCF to generate the data classes for you automatically when you reference a WCF service. You can also "hack" this process by referencing a published DataContract in a new user-developed class (or two or three); You can then transfer data between instances of these classes, and any other new ones you create, via serialization. This is also possible but much more difficult with XML serialization, and impossible with binary serialization.
Upvotes: 0
Reputation: 10366
This is a site i found when i was looking into the same issue. You should check this out
Quoting from the same link mentioned above:
Advantages of DataContractSerializer over XMLSerializer
Hope it helps!
Upvotes: 1