public static void Load() { try { BookmarkEntity bookmarkLib; XmlSerializer serializer = new XmlSerializer(typeof(BookmarkEntity)); if (!File.Exists(BookmarksFile)) { bookmarks = new BookmarkEntity(); } else { using (TextReader reader = new StreamReader(BookmarksFile)) { bookmarkLib = (BookmarkEntity)serializer.Deserialize(reader); bookmarks = bookmarkLib; } } } catch { bookmarks = new BookmarkEntity(); } }
public static void Load() { try { BookmarkEntity bookmarkLib; XmlSerializer serializer = new XmlSerializer(typeof(BookmarkEntity)); if (!File.Exists(Utils.GetDataFolderPath() + "\\bookmarks.xml")) { bookmarks = new BookmarkEntity(); } else { using (TextReader reader = new StreamReader(Utils.GetDataFolderPath() + "\\bookmarks.xml")) { bookmarkLib = (BookmarkEntity)serializer.Deserialize(reader); bookmarks = bookmarkLib; } } } catch { bookmarks = new BookmarkEntity(); } }