Click here to Skip to main content
15,902,492 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to reclaim the memory manually Pin
devin1239-Jun-05 12:30
devin1239-Jun-05 12:30 
GeneralRe: How to reclaim the memory manually Pin
Colin Angus Mackay9-Jun-05 12:33
Colin Angus Mackay9-Jun-05 12:33 
GeneralRe: How to reclaim the memory manually Pin
devin1239-Jun-05 12:43
devin1239-Jun-05 12:43 
GeneralRe: How to reclaim the memory manually Pin
Colin Angus Mackay9-Jun-05 12:49
Colin Angus Mackay9-Jun-05 12:49 
GeneralRe: How to reclaim the memory manually Pin
devin1239-Jun-05 13:56
devin1239-Jun-05 13:56 
Generalsubdirectories Pin
Pyro Joe9-Jun-05 9:25
Pyro Joe9-Jun-05 9:25 
GeneralRe: subdirectories Pin
Christian Graus9-Jun-05 12:21
protectorChristian Graus9-Jun-05 12:21 
GeneralRe: subdirectories Pin
Colin Angus Mackay9-Jun-05 12:23
Colin Angus Mackay9-Jun-05 12:23 
Pyro Joe wrote:
How do I get all the ones below that one, and below that one and send them to an array?

By doing a recursive call like this:
public ArrayList Directories(DirectoryInfo startDir)
{
    ArrayList list = new ArrayList();
    DirectoryInfo[] dirs = startDir.GetDirectories();
    foreach(DirectoryInfo dir in dirs)
    {
        list.Add(dir);
        list.AddRange(Directories(dir));        
    }  
}


See how the Directories() calls itself, but for the subdirectory.

Does this help?

DISCLAIMER: I typed the code directly in so there may be some syntax errors


My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More


GeneralRe: subdirectories Pin
Pyro Joe9-Jun-05 17:15
Pyro Joe9-Jun-05 17:15 
GeneralRe: subdirectories Pin
Pyro Joe10-Jun-05 9:59
Pyro Joe10-Jun-05 9:59 
GeneralProblems Pin
Member 12583739-Jun-05 8:48
Member 12583739-Jun-05 8:48 
GeneralRe: Problems Pin
Christian Graus9-Jun-05 12:30
protectorChristian Graus9-Jun-05 12:30 
GeneralE-mail to Fax in C#.net ! Pin
dvijay19-Jun-05 8:41
dvijay19-Jun-05 8:41 
GeneralCapturing Trace messages Pin
Marc Clifton9-Jun-05 5:24
mvaMarc Clifton9-Jun-05 5:24 
GeneralRe: Capturing Trace messages Pin
S. Senthil Kumar9-Jun-05 6:17
S. Senthil Kumar9-Jun-05 6:17 
GeneralRe: Capturing Trace messages Pin
Marc Clifton9-Jun-05 12:25
mvaMarc Clifton9-Jun-05 12:25 
GeneralRe: Capturing Trace messages Pin
Michael P Butler9-Jun-05 9:25
Michael P Butler9-Jun-05 9:25 
GeneralRe: Capturing Trace messages Pin
Marc Clifton9-Jun-05 12:27
mvaMarc Clifton9-Jun-05 12:27 
Questionlocalization question -- maybe Heath knows???? Pin
LongRange.Shooter9-Jun-05 4:37
LongRange.Shooter9-Jun-05 4:37 
AnswerRe: localization question -- maybe Heath knows???? Pin
Anonymous9-Jun-05 5:05
Anonymous9-Jun-05 5:05 
GeneralData in DataTables Pin
exhaulted9-Jun-05 4:05
exhaulted9-Jun-05 4:05 
GeneralRe: Data in DataTables Pin
Robert Rohde9-Jun-05 8:42
Robert Rohde9-Jun-05 8:42 
GeneralGet IP Address Pin
Anonymous9-Jun-05 3:36
Anonymous9-Jun-05 3:36 
GeneralRe: Get IP Address Pin
leppie9-Jun-05 3:46
leppie9-Jun-05 3:46 
GeneralRe: Get IP Address Pin
Dave Kreskowiak9-Jun-05 8:16
mveDave Kreskowiak9-Jun-05 8:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.