public void Write(StreamWriter sw) { sw.WriteLine(IniSec.makeSec(SecName)); for (int i = 0; i < n; i++) { sw.WriteLine(LHS[i] + "=" + RHS[i]); } }
public string get(string sec, string key, out bool success) { success = false; for (int i = 0; i < sections.Count; i++) { if (IniSec.makeSec(sections[i].SecName) == IniSec.makeSec(sec)) { return(sections[i].get(key, out success)); } } return("");//else it didn't find it }
public void SetKey(string mainsec, string curremotepre, string v) { int index = 0; for (int i = 0; i < sections.Count; i++) { if (IniSec.makeSec(sections[i].SecName) == IniSec.makeSec(mainsec)) { index = i; } } sections[index].Setkey(curremotepre, v); }
public IniSec getSec(string sec) { for (int i = 0; i < sections.Count; i++) { if (IniSec.makeSec(sections[i].SecName) == IniSec.makeSec(sec)) { return(sections[i]); } } return(new IniSec("no sec", new string[1] { "nadah" })); }