/// <summary> /// Initializes a new instance of the IniParser class. /// </summary> /// <param name="textReader">TextReader representing an ini file.</param> /// <param name="duplicateNameHandling">Specifies how IniParser will handle duplicate names.</param> public IniParser(TextReader textReader, DuplicateNameHandling duplicateNameHandling) { if (textReader == null) { throw new ArgumentNullException("textReader"); } this.duplicateNameHandling = duplicateNameHandling; this.Parse(textReader); }