[OK]をので、私はC#C#で2つのリストの違いをどのように取得できますか?私が今見て比較する必要が
List<Attribute> attributes = new List<Attribute>();
List<string> songs = new List<string>();
一つに二つのリストを持っているが、文字列であり、もう一つは、私は、単純な
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;
}
}
をcreated..very属性オブジェクトであります彼らは、属性リストのnに含まれていないので、私は「他」と「また別の」返す方法をしたい
songs.Add("something");
songs.Add("another");
songs.Add("yet another");
Attribute a = new Attribute("500", "http://google.com", "something");
attributes.Add(a);
例えばので、属性名にはどのような曲ではありませんこれは、すべての曲を見つけるための方法であることリスト
意志の差はリスト – Trace
ことがありません、IEnumerableをするが、列挙ToListメソッド() –
を呼び出します。必要ならToList()を使います。 –