public IniFileSection(IniFile file, string name)
{
if (file == null)
throw new ArgumentNullException("file");
if (name == null)
throw new ArgumentNullException("name");
File = file;
Name = name;
if (File.SectionsByName.ContainsKey(name))
throw new InvalidOperationException("Ini file section already exists.");
Settings = new List<IniFileSetting>();
SettingsByName = new Dictionary<string, IniFileSetting>();
File.Sections.Add(this);
File.SectionsByName[Name] = this;
}