コード例
の CreateCsv メソッドが次のように書けますわね♪
var sb = new StringBuilder(); sb.Append(GetCsvHeader()).Append(NEWLINE_CHARACTER); parentList.ForEach(p => sb.Append(CreateCsvLine(p)).Append(NEWLINE_CHARACTER)); return sb.ToString();
↓
var sb = new StringBuilder(); sb.AppendLine(GetCsvHeader()); parentList.ForEach(p => sb.AppendLine(CreateCsvLine(p))); return sb.ToString();