title: Using Key like "[]Server" into sortedDictionary, but why?
body: <p>I am trying to understand and probably reuse part of DevExpress Demo code to save simple settings into ini file. I know I can use .NET System.Configuration doing what I want. Just for a smallish project, simple save it as a text file seem more flexible and light-weighted, at least that is what it seems.</p>
  
  <p>Anyway, while I am playing with it, I am trying to understand why the code I am reading trying to add key as "[]Server" and "[]DBFormat" as key name. They do that for a reason I can not understand yet, I could probably use some help here.</p>
  
  <p>Here is the Code I think relevant:</p>
  
  <pre><code> public class IniFile {
          SortedDictionary&lt;string, string&gt; data = new SortedDictionary&lt;string, string&gt;();
          ...
          public void Load(string path) {
              using(StreamReader sr = new StreamReader(path)) {
                  string folder = "[]";
                  while(!sr.EndOfStream) {
                      string s = sr.ReadLine().Trim();
                      if(s.Length == 0 || s[0] == ';') continue;
                      if(s[0] == '[') {
                          folder = s;
                          continue;
                      }
                      string key, value;
                      int delim = s.IndexOf('=');
                      if(delim &lt; 0) {
                          key = folder + s.Replace("[", string.Empty).Replace("]", string.Empty);
                          value = string.Empty;
                      } else {
                          key = folder + s.Remove(delim).TrimEnd().Replace("[", string.Empty).Replace("]", string.Empty);
                          value = s.Substring(delim + 1).TrimStart();
                      }
                      if(!data.ContainsKey(key)) data.Add(key, value);
                      else data[key] = value;
                  }
              }
          }
          ...
          public void Save(string path) {
              using(StreamWriter sw = new StreamWriter(path)) {
                  string folder = "[]";
                  foreach(string key in data.Keys) {
                      int delim = key.IndexOf(']');
                      string keyFolder = key.Remove(delim + 1);
                      string keyName = key.Substring(delim + 1);
                      if(keyFolder != folder) {
                          folder = keyFolder;
                          sw.WriteLine(folder);
                      }
                      sw.WriteLine(keyName + " = " + data[key]);
                  }
              }
          }
  
          void AddRawValue(string key, string value) {
              key = key.Trim();
              value = value.Trim();
              int folderBegin = key.IndexOf('[');
              int folderEnd = key.IndexOf(']');
              if(folderBegin != 0 || folderEnd &lt; 0) throw new ArgumentException("key");
              data.Add(key, value);
          }
  </code></pre>
  
  <p>And here is part of the ini file itself:</p>
  
  <pre><code>DBFormat = "Mdb"
  Login = "admin"
  Password = ""
  Server = "(localhost)"
  </code></pre>
  
  <p>Obvious, they go though the trouble to add [] into keyname for some reason, but end up not using it in the demo data. I am think they are using string inside [] to group settings?</p>