So let's say i have a this class T which contains a List variable. How can I go through all items inside of List and then all items inside of each items of the List and so on until every single items have been treated? I know how to do this using a recursive method but i'm wondering if there is a way without using a recursive method that calls itself. Sorry if the question is confusing, a better example using folders could be as
Folder1 > contains Folder2, Folder3, Folder4
Folder2 > contains Folder5, Folder6
Folder5 > contains Folder7
Folder3 > contains Folder8, Folder9
Folder9 > contains Folder10
Folder10 > contains Folder11
I would like to iterate through all of these folders in order (f1, f2, f5, f7, f6, f3, f8, f9, f10, f11, f4)
Does this make more sense? Thanks.