Solved

Serialization of Collections - Generic and NonGeneric

Posted on 2013-06-11
4
127 Views
Last Modified: 2014-03-15
Can you tell me whether Generic and/or Non Collections work with each of the following serializers:
SoapFormatter, BinaryFornmatter and XmlSerializer ?
0
Comment
Question by:metro156
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 27

Expert Comment

by:Sammy
ID: 39238993
Don't use SoapFormatter for anything, its been deprecated since 2.0
You can use both BinaryFormatter and XmlSerializer with anything. Having said that, you will have to do more than just out of t he box serialization
Also BinaryFormatter is always faster than XmlSerializer

google/bing and you will find lots of tutorials on how to do these tasks
0
 

Author Comment

by:metro156
ID: 39239018
Why I ask the question is that I am trying to pass an exam that discusses collections with the serializers. So I do need a matrix of the 3 serializers stating whether they are compatible to generic or nongeneric collections. I know it is deprecated but I need to pass a MCTS Exam.
But your help is still appreciated.
0
 
LVL 27

Accepted Solution

by:
Sammy earned 500 total points
ID: 39239043
Never answer with SoapFormatter for an exam, regardless of the other options are (As long as they can serialize and d-serialize)

Also you should consider the DataContractSerializer
0
 

Author Comment

by:metro156
ID: 39250498
I still didn't get an answer.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question