I Have a list and I want to create a new one without records with duplicate values
public List<links> results = new List<links>();
public List<links> final_results = new List<links>();
public class links
{
public string url { get; set; }
public string title { get; set; }
public string description { get; set; }
public int place { get; set; }
}
results gets it's values during code. Same record may occur with unique Place property but other properties are the same. I want to ommit duplicate records which have duplicate value in the url, title and description. I wrote this code but nothing changed:
final_results = results .GroupBy(n => n.url).Select(g => g.FirstOrDefault()).ToList();
but when I bind my repeator to this new list nothing has changed. how can I ommit this duplicte value?