public static string DiffReport <T>(IEnumerable <T> expected, IEnumerable <T> actual, IEqualityComparer <T> comparer = null, Func <T, string> toString = null, string separator = ",\r\n") { LCS <T> lcs = (comparer != null) ? new LCS <T>(comparer) : LCS <T> .Default; toString = toString ?? new Func <T, string>(obj => obj.ToString()); IList <T> expectedList = expected as IList <T> ?? new List <T>(expected); IList <T> actualList = actual as IList <T> ?? new List <T>(actual); return(string.Join(separator, lcs.CalculateDiff(expectedList, actualList, toString))); }