KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What happens if we serialize a static class? Can more than one instance of the static class be created if we serialize it? [Serializable] public static class MyClass { public static MyClass() { } public static bool IsTrue() { return true; } } Suppose I XmlSerialize the object to a XML file, and at a later time I de-serialize back to a object. Another copy exists in the memory (created when somone instintiated the static calss for the first time). Will, there be two copy of the of the object? If yes, can we stop that? Does it apply to any class which follows the singleton pattern?
Tags (comma-separated)
Save Edits
Cancel