Guys,
Can you explain?
What type of objects cannot be serialized?
Thanks
Guys,
Can you explain?
What type of objects cannot be serialized?
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jul 1, 2011, 12:34 AM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Jul 1, 2011, 10:49 PM EDT
Objects with members for which serialization would not make sense, such as SqlConnection, cannot be serialized unless you write something that serializes in a way that you need it to.
An object of the Form class cannot be serialized and controls in the Forms namespace cannot be. Perhaps the reason why a form cannot be serialized is because it has so many properties and it woud be inneficient to write all of it out when you need just a small portion of it.
A DataRow cannot be serialized. DataTable and DataSet can be but not DataRow.
Classes that the developer did not mark as serializable are not serializable and they might need more modification before they will be serializable.