Ejemplo n.º 1
0
 public IniFileSection this[string sectionName]
 {
     get
     {
         IniFileSection section = getSection(sectionName);
         if (section != null)
         {
             return(section);
         }
         IniFileSectionStart iniFileSectionStart;
         if (sections.Count > 0)
         {
             IniFileSectionStart sectionStart = sections[sections.Count - 1].sectionStart;
             iniFileSectionStart = sectionStart.CreateNew(sectionName);
         }
         else
         {
             iniFileSectionStart = IniFileSectionStart.FromName(sectionName);
         }
         elements.Add(iniFileSectionStart);
         section = new IniFileSection(this, iniFileSectionStart);
         sections.Add(section);
         return(section);
     }
 }