I have list of list and want to remove duplicate from list.
Data is stored in list format say IEnumerable<IEnumerable<string>> tableData
if we consider it as table value,
parent list is for rows and child list is values of every column.
Now I want to delete all duplicate rows. from below table value A is duplicate.
List<List<string>> ls = new List<List<string>>();
ls.Add(new List<string>() { "1", "A" });
ls.Add(new List<string>() { "2", "B" });
ls.Add(new List<string>() { "3", "C" });
ls.Add(new List<string>() { "4", "A" });
ls.Add(new List<string>() { "5", "A" });
ls.Add(new List<string>() { "6", "D" });
IEnumerable<IEnumerable<string>> tableData = ls;
var abc = tableData.SelectMany(p => p).Distinct(); ///not work
after operation, I want abc should be exactly tableData format
ls.Add(new List<string>() { "1", "A" });
ls.Add(new List<string>() { "2", "B" });
ls.Add(new List<string>() { "3", "C" });
ls.Add(new List<string>() { "6", "D" });
PropertyData? It would really help if you'd show a short but complete program demonstrating what your data looks like.