Web Dev
Web Dev

Reputation: 735

SoapFormatter class obsolete or not?

I am working with an old project and doing minor changes. At some places the code uses SoapFormatter class to serialize and deserialize data in SOAP format. The code is working fine without any issues.

MSDN help says the following about the SoapFormatter class :

"Beginning with the .NET Framework 2.0, this class is obsolete. Use BinaryFormatter instead."

https://msdn.microsoft.com/en-us/library/system.runtime.serialization.formatters.soap.soapformatter(v=vs.110).aspx

I don't get any errors or warnings when I compile the project on .NET 4.5. Now my confusion is -

  1. Is SoapFormatter really obsolete or not (for .NET 4.5 apps)?

  2. How do I use BinaryFormatter instead of SoapFormatter to serialize/deserialize in SOAP format?

I don't want to change the code unless it is absolutely needed.

Thank you in advance!

Upvotes: 7

Views: 897

Answers (0)

Related Questions