It's me again and I have another problem. Somewhere, I've found following code:
private T DeepDeserialize<T>(string fileName)
{
T returnValue;
using (FileStream str = new FileStream(fileName, FileMode.Open))
{
BinaryFormatter binaryFormatter = new BinaryFormatter();
returnValue = (T)binaryFormatter.Deserialize(str);
}
return returnValue;
}
I've modified some classes today and now, it always throws an error, which could be translated like this: Before completing the analysis was detected ending stream
(I don't know the right translation, the error message is in my language, not in English)
I've tried to insert str.Position = 0;
between these two lines in using
, which I've found somewhere here, but it doesn't help.
Can someone help me to make it work again? I have no ideas what to do...