I am trying to deserialize a XML-file. I need to check if the XML-file stream is empty before tying to deserialize it.
IsolatedStorageFileStream isfs1 = new IsolatedStorageFileStream("test.xml",
FileMode.Open, FileAccess.Read, isf);
// Deserialize the XML to an object
Settings s = new Settings();
SoapFormatter SF= new SoapFormatter();
s = (Settings) SF.Deserialize(isfs1);
How can I check if isfs1
empty or not?