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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jul 1, 2011, 4:34 AM
Sam HobbsPosted Jul 2, 2011, 2:49 AM
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.