Nov 30th, 2004, 11:13 PM
constructor to deserialize object not found [Resolved]
any idea of what the following exception actualy means? I mean in usable programmer speak? All of the classes to be serialized have regular constructors. Is there some sort of special constructor for deserializing that I eveidently don't know about? I've been working on this UserDB set of classes for quite a bit longer than I wanted to and vbforums.com search doesn't find very much when I copy + paste "The constructor to deserialize an object of type was not found"
It's also bugging me that pressing F1 no longer brings you to a help page with a useful description of the exeception. Now, it brings me to a help page describing the intricate workings of the exception dialog which contains no more than four buttons...
An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll
Additional information: The constructor to deserialize an object of type GenericChatServer.Users was not found.
As you can probably tell, I'm a bit pissed.
Last edited by agent; Nov 30th, 2004 at 11:55 PM.
Nov 30th, 2004, 11:35 PM
Do all dependent or child objects of that object have parameterless constructors?
Nov 30th, 2004, 11:54 PM
ok... though it's not in the documentation as far as I could find, if the class inherits Hashtable, you need to include
Protected Sub New(ByVal info As Runtime.Serialization.SerializationInfo, ByVal context As Runtime.Serialization.StreamingContext)
If the class uses no constructor, you'll need to add a blank one.
Click Here to Expand Forum to Full Width
Survey posted by VBForums.