private bool TrySeekSection(String sectionName, ref int lineNumber) { string currentSectionName = null; while (SeekSection(ref lineNumber, out currentSectionName) && !string.Equals(sectionName, currentSectionName, StringComparison.Ordinal)) { lineNumber++; } return string.Equals(sectionName, currentSectionName, StringComparison.Ordinal); }