public static void LoadSettings() { _settingsObject = new SettingsObject(); string fileName = SettingsFileName; if (File.Exists(fileName)) { var serializer = new XmlSerializer(_settingsObject.GetType()); var reader = new XmlTextReader(fileName); try { _settingsObject = serializer.Deserialize(reader) as SettingsObject; } finally { reader.Close(); } } }
public static void LoadSettings() { _settingsObject = new SettingsObject(); string fileName = SettingsFileName; if (File.Exists(fileName)) { var serializer = new XmlSerializer(_settingsObject.GetType()); var reader = new XmlTextReader(fileName); try { _settingsObject = serializer.Deserialize(reader) as SettingsObject; } finally { reader.Close(); } } if (DefaultRecordLimit == 0) DefaultRecordLimit = 100; }