When I call the Deserialize method on BinaryFormatter, I sometimes get the following exception:
System.Runtime.Serialization.SerializationException: No top object. What is scary is that it seems to happen at random with the same code (it works most of the time, but not all of the time). Are there any known bugs with MemoryStreams or Serialization? The code looks like this: MemoryStream ms = new MemoryStream(objByteArray); ms.Seek(0,SeekOrigin.Begin); BinaryFormatter bf = new BinaryFormatter(); Object obj = (Object) bf.Deserialize(ms); Any help would be greatly appreciated. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.