Does anybody have an example of Binary, Soap or XML serialization of a class that inherits Treenode? I am getting the feeling that it can't be done.
-----Original Message----- From: Christoph [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 12:47 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Object serialization to string representation This usually means that your class implements the ISerializable interface, but does not implement the required constructor of the format. Here's from the Framework docs: The ISerializable interface implies a constructor with the signature Constructor(SerializationInfo info, StreamingContext context). At deserialization time, the current constructor is called only after the data in the SerializationInfo has been deserialized by the formatter. In general this constructor should be protected if the class is not sealed (NotInheritable in Visual Basic) . I couldn't tell that this is the case from your code samples ... HTH, Christoph Schittko Software Architect Mshow - a division of InterCall ----- Original Message ----- From: "franklin gray" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 21, 2002 12:25 PM Subject: Re: [DOTNET] Object serialization to string representation Any idea what this means? An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll Additional information: The constructor to deserialize an object of type SoapSerialization.Class2 was not found. I tried it 3 ways with an error but the 4th works. <Serializable()> Public Class Class2 Inherits TreeNode Public Sub New() MyBase.New("Blank") End Sub Public MyData As String End Class <Serializable()> Public Class Class2 Inherits TreeNode Public Sub New() End Sub Public MyData As String End Class <Serializable()> Public Class Class2 Inherits TreeNode Public MyData As String End Class This works though <Serializable()> Public Class Class2 Public MyData As String End Class You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.