Say I have this list
List<string> sampleList = new List<string>
{
"C:\\Folder1",
"D:\\Folder2",
"C:\\Folder1\\Folder3",
"C:\\Folder111\\Folder4"
};
I'd like to remove the paths that are contained in other folders, for example we have C:\Folder1 and C:\Folder1\Folder3
the list's third entry should go away because C:\Folder1 contains C:\Folder1\Folder3
is there something that does that in the .net framework or do i have to write the algo myself?