.NET Framework Bookmark and Share   
 index > .NET Remoting and Runtime Serialization > Three simple serialization questions about collection classes
 

Three simple serialization questions about collection classes

Recently I converted a class (called "Players") that was previously derived from ArrayList to now be derived from Dictionary. When I tried to deserialize it I got the runtime error: �em>The constructor to deserialize an object of type 'CMC1.Players' was not found �

I was able to fix this by adding a dummy constructor that calls the base class:

public Players(SerializationInfo serInfo, StreamingContext serContext)
: base(serInfo, serContext)
{

}

But I have 3 questions:

1. Why is this required for Dictionary but not ArrayList?
2. Does Microsoft document which classes require this?
3. Why did the error occur during DEserialization but not the original serialization?
plnelson
Amolpbhavsar
  • Proposed As Answer byAmolpbhavsar Tuesday, September 22, 2009 2:45 PM
  •  
Amolpbhavsar

You can use google to search for other answers

Custom Search

More Threads

• Remoting across the internet - 2 way coms needed
• CLR 2.0 XmlSerialization Bug possible....
• Working example of remoting with events in C++ and .NET 2.0?
• getting nested objects with reflection and recursion
• Channel already registered
• Remoting 2.0 security issues
• SerializationException was Unhandled
• How to suppress base64 encoding of Byte[] streams?
• Help with remoting error on Win2k
• Why can't I get to my Windows Form from my remote call? (Or why is .Net Remoting documentation such shite?)