public Options(string OptionsPath) { Dat = new OptDat(); Path = OptionsPath; OptFile = OptionsPath + "\\" + Filename; if (!File.Exists(OptFile)) { Save(); } Load(); }
public void Load() { try { XmlSerializer s = new XmlSerializer(typeof(OptDat)); TextReader r = new StreamReader(OptFile); this.Dat = (OptDat)s.Deserialize(r); r.Close(); } catch (Exception ex) { } finally { } }
public void Load() { TextReader r = null; try { XmlSerializer s = new XmlSerializer(typeof(OptDat)); r = new StreamReader(OptFile); this.Dat = (OptDat)s.Deserialize(r); r.Close(); } catch (Exception ex) { ex = ex; } finally { if (r != null) { r.Close(); } } }
public void Load() { try { XmlSerializer s = new XmlSerializer(typeof(OptDat)); TextReader r = new StreamReader(OptFile); this.Dat = (OptDat)s.Deserialize(r); r.Close(); } catch(Exception ex) { } finally { } }
public void Load() { TextReader r=null; try { XmlSerializer s = new XmlSerializer(typeof(OptDat)); r = new StreamReader(OptFile); this.Dat = (OptDat)s.Deserialize(r); r.Close(); } catch(Exception ex) { ex = ex; } finally { if(r != null) { r.Close(); } } }