Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private FileContent GetFileContent(string path)
- {
- FileContent f = null;
- try
- {
- XmlSerializer serializer = new XmlSerializer(typeof(FileContent));
- FileStream fileStream = new FileStream(path, FileMode.Open);
- f = (FileContent)serializer.Deserialize(fileStream);
- fileStream.Dispose();
- }
- catch (Exception ex)
- {
- f = GetFileContent(path);
- }
- return f;
- }
Add Comment
Please, Sign In to add comment