private void Validate() { for (int i = 0; i < Lines.Count; i++) { var line = Lines[i]; if (!IsProperty(line) && !IsSection(line) && !IsCommentOrBlank(line)) { throw new InvalidDataException(GetErrorMessage(i)); } } }