0

I have a problem with understanding a deserialization code....Can anyone help with this one:
public clsSerial DeserializeFriend() //why clsSerial is done here ??
{
clsSerial temp = new clsSerial();
try
{
BinaryFormatter format = new BinaryFormatter();
FileStream myStream = new FileStream(“Test.bin”,
FileMode.Open);
temp = (clsSerial)format.Deserialize(myStream);// and why (clsSerial)is added here
myStream.Close();
}
catch (Exception ex)
{
string buff = ex.Message;
return null;
}
return temp;
}
thanx...:)

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by prathoven
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.