public string SaveStudentSummariesInCSV() { string StringCSV = ""; foreach (KeyValuePair <string, string> KeyValue in ActionsConst.StudentPsevdonims) { StringCSV = string.Concat(StringCSV, KeyValue.Key, ";"); } StringCSV = StringCSV.Remove(StringCSV.LastIndexOf(';')); StringCSV = string.Concat(StringCSV, Environment.NewLine); foreach (StudentSummary Now in Summaries) { foreach (KeyValuePair <string, string> KeyValue in ActionsConst.StudentPsevdonims) { StringCSV = string.Concat(StringCSV, Now.GetType().GetProperty( KeyValue.Value).GetValue(Now), ";"); } StringCSV = StringCSV.Remove(StringCSV.LastIndexOf(';')); StringCSV = string.Concat(StringCSV, Environment.NewLine); } return(StringCSV); }