Take the 2-minute tour ×  Ok so I have two lists in C#
List<Attribute> attributes = new List<Attribute>(); List<string>
songs = new List<string>();  one is of strings and and one is of
a attribute object that i created..very simple  class Attribute
public string size { get; set; }     public string link { get;
set; }     public string name { get; set; }     public
Attribute(){}     public Attribute(string s, string l, string n)
size = s;         link = l;         name = n;  I now have to
compare to see what songs are not in the attributes name so for
example  songs.Add("yet another");  Attribute a = new
Attribute("500", "http://google.com", "something" );   I want a
way to return "another" and "yet another" because they are not
in the attributes list name  so for pseudocode  difference =
songs - attributes.names share|improve this question add comment
4 Answers  up vote 20 down vote accepted var difference =
songs.Except(attributes.Select(s=>s.name)).ToList();   Added
ToList() to make it a list