-
Nov 30th, 2004, 11:13 PM
#1
Thread Starter
Fanatic Member
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"
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.
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...
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
#2
Do all dependent or child objects of that object have parameterless constructors?
-
Nov 30th, 2004, 11:54 PM
#3
Thread Starter
Fanatic Member
resolved it
ok... though it's not in the documentation as far as I could find, if the class inherits Hashtable, you need to include
VB Code:
Protected Sub New(ByVal info As Runtime.Serialization.SerializationInfo, ByVal context As Runtime.Serialization.StreamingContext)
MyBase.New(info, context)
End Sub
If the class uses no constructor, you'll need to add a blank one.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|