i try to scan a rootdirectory for all *.dll files inside the root directory including the subdirectories.
i´ve looked for a example and i found one. it works, but i can understand how c# holds the datas in this example.
if you debug this code, you will see that they use an arraylist which is a member variable of the class for each recursion. the arraylist gets a new reference for each directory level, i think, the function should loose the old directory informations and another recursion should not be possible - but is works.
does anybody know why?
The ArrayList isn't used to store the results of the search - the NameValueCollection found is. And since it is merely added to at each step of the recursion, not reassigned, it works.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.