Alexandria.IniFileSection.IniFileSection C# (CSharp) Метод

IniFileSection() публичный Метод

Initialise the section.
public IniFileSection ( IniFile file, string name ) : System
file IniFile
name string
Результат System
        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;
        }