/// <param name="chapters">The List of chapters</param>\r
/// <param name="filePathName">Path to save the csv file</param>\r
/// <returns>True if successful </returns>\r
- private static bool ChapterCsvSave(Dictionary<int, string> chapters, string filePathName)\r
+ private static bool ChapterCsvSave(List<string> chapters, string filePathName)\r
{\r
- string csv = chapters.Aggregate(string.Empty, (current, row) => current + (row.Key + "," + row.Value.Replace(",", "\\,") + Environment.NewLine));\r
+ string csv = string.Empty;\r
+ int counter = 0;\r
+\r
+ foreach (string name in chapters)\r
+ {\r
+ csv += counter + "," + name.Replace(",", "\\,") + Environment.NewLine;\r
+ counter ++;\r
+ }\r
+\r
\r
StreamWriter file = new StreamWriter(filePathName);\r
file.Write(csv);\r