私はこのIEnumerableを持っています:
var collection = from obj in list
select new
{
Title = (string)obj.Element("title"),
otherAtt = (string)obj.Element("otherAtt"),
..
..
..
..
};
そして、タイトルが重複している「コレクション」内のすべてのオブジェクトを削除したいと思います。そして、重複した最後のものを残すために。
例えば:
collection = {
{Title="aaa" ,otherAtt="1" ,....},
{Title="bbb" ,otherAtt="2" ,....},
{Title="aaa" ,otherAtt="3" ,....},
{Title="aaa" ,otherAtt="4" ,....},
{Title="ccc" ,otherAtt="5" ,....},
{Title="bbb" ,otherAtt="6" ,....}
}
そして、フィルターによってコレクションが次のように見えるようにする必要があります。
collection = {
{Title="aaa" ,otherAtt="4" ,....},
{Title="ccc" ,otherAtt="5" ,....},
{Title="bbb" ,otherAtt="6" ,....}
}
ありがとう。