I have a datamodel like this :
public class AmpFile
{
public string filename { get; set; }
public string actualpath { get; set; }
}
Now I have a list of it like this :
[ list member 1 ] - filename: "testfile1.jpg" - actualpath: "C:\testpath\testfile1.jpg"
[ list member 2 ] - filename: "brickwall.jpg" - actualpath: "C:\testpath\brickwall.jpg"
[ list member 3 ] - filename: "mydata.txt" - actualpath: "D:\mydata.txt"
[ list member 4 ] - filename: "testfile1.jpg" - actualpath: "E:\demo\testfile1.jpg"
[ list member 5 ] - filename: "mydata.txt" - actualpath: "F:\somefolder\mydata.txt"
[ list member 6 ] - filename: "testfile1.jpg" - actualpath: "F:\somefolder\testfile1.jpg"
[ list member 7 ] - filename: "testfile2.jpg" - actualpath: "F:\somefolder\testfile2.jpg"
[ list member 7 ] - filename: "testfile3.jpg" - actualpath: "D:\testfile3.jpg"
Now I want to find duplicates of each member and if there's a duplicate of it , I want to remove duplicates + the reference itself so the result I want to achieve is :
[ list member 1 ] - filename: "brickwall.jpg" - actualpath: "C:\testpath\brickwall.jpg"
[ list member 2 ] - filename: "testfile2.jpg" - actualpath: "F:\somefolder\testfile2.jpg"
[ list member 3 ] - filename: "testfile3.jpg" - actualpath: "D:\testfile3.jpg"
How can I do it ?