When I try to do it with the code below.
FileStream fileStream
=
new
FileStream(
"C:\\apps\\user.tmp",
FileMode.Open,
FileAccess.Read,
FileShare.Read);
BinaryFormatter bf=new
BinaryFormatter();
pd = (PianoData)bf.Deserialize(fileStream);
System.Console.WriteLine();
fileStream.Close();
Exception occurred as I had excepted.
"The input stream is not a valid binary format."
I wonder if I can do it by another way
View Complete Post