hope someone can help. I have an object:
public class folder
{
public string folderName { get; set; }
public string folderPath { get; set; }
public List<folder> subFolders { get; set; }
}
as you can see the object contains an object referencing itself allowing me to build up a list of folders and sub folders, I then have a
List<folder> mycustomlist ect..
to store this in. This list can be extremely deep and works fine when binding to a treeview or custom listview.
My problem is trying to remove a nested folder from the List, I can get the object but when using
mycustomlist.Remove(thefolder)
it cant seem to locate the nested object to remove it.
I've tried several ways using Linq but with no joy, maybe their is a better way of doing this?
Hope someone can help,
Thanks
Nath