Click here to Skip to main content
15,911,035 members
Home / Discussions / C#
   

C#

 
GeneralDelegate parameter info Pin
leppie15-Jan-03 6:37
leppie15-Jan-03 6:37 
GeneralRe: Delegate parameter info Pin
Richard Deeming15-Jan-03 7:16
mveRichard Deeming15-Jan-03 7:16 
GeneralRe: Delegate parameter info Pin
leppie15-Jan-03 8:15
leppie15-Jan-03 8:15 
GeneralPlease help me(All about loading control in class file) Pin
Gurus Guru15-Jan-03 2:09
Gurus Guru15-Jan-03 2:09 
GeneralRe: Please help me(All about loading control in class file) Pin
James T. Johnson15-Jan-03 15:13
James T. Johnson15-Jan-03 15:13 
GeneralRe: Please help me(All about loading control in class file) Pin
Anonymous15-Jan-03 20:50
Anonymous15-Jan-03 20:50 
GeneralRe: Please help me(All about loading control in class file) Pin
Vasudevan Deepak Kumar15-Jan-03 23:08
Vasudevan Deepak Kumar15-Jan-03 23:08 
GeneralRe: Please help me(All about loading control in class file) Pin
Gurus Guru17-Jan-03 6:02
Gurus Guru17-Jan-03 6:02 
Generalknow the apps a user/machine ran Pin
Giovanni Bejarasco15-Jan-03 1:30
Giovanni Bejarasco15-Jan-03 1:30 
GeneralRe: know the apps a user/machine ran Pin
Mazdak15-Jan-03 6:06
Mazdak15-Jan-03 6:06 
GeneralCalling .NET object from COM Pin
SimonS14-Jan-03 22:10
SimonS14-Jan-03 22:10 
GeneralRe: Calling .NET object from COM Pin
Daniel Turini14-Jan-03 22:17
Daniel Turini14-Jan-03 22:17 
GeneralRe: Calling .NET object from COM Pin
Nick Parker15-Jan-03 8:44
protectorNick Parker15-Jan-03 8:44 
GeneralRe: Calling .NET object from COM Pin
Nick Parker15-Jan-03 18:00
protectorNick Parker15-Jan-03 18:00 
GeneralIcons Pin
Tommus14-Jan-03 21:38
Tommus14-Jan-03 21:38 
GeneralRe: Icons Pin
FruitBatInShades15-Jan-03 1:25
FruitBatInShades15-Jan-03 1:25 
GeneralRe: Icons Pin
jtmtv1816-Jan-03 9:40
jtmtv1816-Jan-03 9:40 
GeneralRe: Icons Pin
leppie16-Jan-03 11:08
leppie16-Jan-03 11:08 
Generalsend mail Pin
Dorina14-Jan-03 21:13
Dorina14-Jan-03 21:13 
Generalapplication flashing in taskbar Pin
fredza14-Jan-03 20:43
fredza14-Jan-03 20:43 
GeneralRe: application flashing in taskbar Pin
SimonS14-Jan-03 22:21
SimonS14-Jan-03 22:21 
QuestionIdle event? Pin
kman14-Jan-03 12:34
kman14-Jan-03 12:34 
Generalaccessing selected text in a foreground window Pin
Gene Yu14-Jan-03 9:37
Gene Yu14-Jan-03 9:37 
GeneralDirectory Drilling/Recursion Pin
MrEyes14-Jan-03 7:57
MrEyes14-Jan-03 7:57 
I am attempting to create a piece of code that will drop through from a root directory and list all files and subdirectories within it (regardless of the directory depth)

As I see it the only way I can do this is through some sort of recursive code, which at the moment elludes me, has anybody come across anything like this before?

At the moment I have the following, which is butt-ugly and doesnt come close to what I need :
<br />
public string ARCHIVE_PATH = ".\\archive\\";<br />
private void RecurseDirectories()<br />
{<br />
 listBox1.Items.Clear();<br />
 DirectoryInfo dir = new DirectoryInfo(ARCHIVE_PATH);<br />
 DirectoryInfo[] diArr = dir.GetDirectories();<br />
 foreach (DirectoryInfo dri in diArr)<br />
 {<br />
  listBox1.Items.Add(dri.Name);<br />
  DirectoryInfo drill_dir = new DirectoryInfo(ARCHIVE_PATH + dri.Name);<br />
  DirectoryInfo[] drill_diArr = drill_dir.GetDirectories();<br />
<br />
  foreach (DirectoryInfo drill_dri in drill_diArr)<br />
  {<br />
   listBox1.Items.Add(drill_dri.Name);<br />
  }<br />
 }		<br />
}

GeneralRe: Directory Drilling/Recursion Pin
Hesham Amin14-Jan-03 9:12
Hesham Amin14-Jan-03 9:12 

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.