public bool?Bool(string key) { string s = IniFileManager.GetParam(section, key, path); if (s == null) { return(null); } int n = Convert.ToInt32(s); if (n < 0 || n > 1) { throw new ArgumentException("string mast be 0 or 1"); } return(n == 1); }
public int?Int(string key) { string s = IniFileManager.GetParam(section, key, path); return(s == null ? null : (int?)Convert.ToInt32(s)); }
public string String(string key) => IniFileManager.GetParam(section, key, path);
public DateTime?DT(string key) { string s = IniFileManager.GetParam(section, key, path); return(s == null ? null : (DateTime?)DateTime.ParseExact(s, "yyyy.MM.dd", null)); }
public double?Double(string key) { string s = IniFileManager.GetParam(section, key, path); return(s == null ? null : (double?)Convert.ToDouble(s)); }