I'm looping through some records, and flagging errors if there are difference using .Except Everything works great, except I want to make a more user friendly error message.
For failedTests, I only want to add the first characters of each line in errorRecords (There may be several lines.) If I do failedTests = string.Join("\n", errorRecords).Substring(0,10); I only get the substring for the first row. I need the substring for each row.
Is there a quick and dirty way to do this?
var errorRecords = sourceList.Except(destList);
failedTests = string.Join("\n", errorRecords);