Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 133
  • Last Modified:

Serialization of Collections - Generic and NonGeneric

Can you tell me whether Generic and/or Non Collections work with each of the following serializers:
SoapFormatter, BinaryFornmatter and XmlSerializer ?
0
metro156
Asked:
metro156
  • 2
  • 2
1 Solution
 
SammyCommented:
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
 
metro156Author Commented:
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
 
SammyCommented:
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
 
metro156Author Commented:
I still didn't get an answer.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now