Click here to Skip to main content
16,008,750 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionList of forms in project Pin
Rudi Groenewald21-Nov-06 19:01
Rudi Groenewald21-Nov-06 19:01 
AnswerRe: List of forms in project Pin
Ed.Poore22-Nov-06 3:59
Ed.Poore22-Nov-06 3:59 
QuestionDirectoryInfo.GetDirectories exception Pin
CPP_Student21-Nov-06 14:44
CPP_Student21-Nov-06 14:44 
AnswerRe: DirectoryInfo.GetDirectories exception Pin
Ed.Poore22-Nov-06 4:03
Ed.Poore22-Nov-06 4:03 
GeneralRe: DirectoryInfo.GetDirectories exception Pin
CPP_Student22-Nov-06 11:45
CPP_Student22-Nov-06 11:45 
GeneralRe: DirectoryInfo.GetDirectories exception Pin
Ed.Poore22-Nov-06 12:24
Ed.Poore22-Nov-06 12:24 
GeneralRe: DirectoryInfo.GetDirectories exception Pin
CPP_Student22-Nov-06 12:45
CPP_Student22-Nov-06 12:45 
GeneralRe: DirectoryInfo.GetDirectories exception Pin
Ed.Poore22-Nov-06 13:21
Ed.Poore22-Nov-06 13:21 
Some points to note:

1) Directory.GetDirectories() returns an array of strings. Argue with the documentation & the code if you want but that's what it returns.
2) The code works just fine, I can copy and paste the results if you want but you may not understand them Suspicious | :suss:
3) Of course the code fails on the first line, you're still trying to recurse the directories, why my snippet did was demonstrate (perhaps too simply) that you needed to handle the recursion yourself so that you could continue searching rather than stopping when the exception occurred.

So in summary what you'll have to do is write a recursive routine which searches through a directory (not including the sub-directories), if it finds a file return it, if it can't read a directory then skip over it. And continue all the way through the loop.

sshhessh


Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9

Ed

GeneralRe: DirectoryInfo.GetDirectories exception Pin
CPP_Student22-Nov-06 13:50
CPP_Student22-Nov-06 13:50 
Questiontextbox multi line Pin
biaali21-Nov-06 6:57
biaali21-Nov-06 6:57 
AnswerRe: textbox multi line Pin
Leah_Garrett21-Nov-06 16:39
Leah_Garrett21-Nov-06 16:39 
GeneralRe: textbox multi line Pin
biaali23-Nov-06 0:08
biaali23-Nov-06 0:08 
QuestionDatagrid in vc++.net Pin
haritha2221-Nov-06 6:51
haritha2221-Nov-06 6:51 
AnswerRe: Datagrid in vc++.net Pin
Paul Conrad25-Dec-06 18:43
professionalPaul Conrad25-Dec-06 18:43 
QuestionHow to generate dynamically proxy for some classes ? Pin
vgrigor121-Nov-06 3:20
vgrigor121-Nov-06 3:20 
GeneralFIX: An application that is based on the .NET Framework 2.0 may crash unexpectedly Pin
Leftyfarrell21-Nov-06 2:48
Leftyfarrell21-Nov-06 2:48 
GeneralRe: FIX: An application that is based on the .NET Framework 2.0 may crash unexpectedly Pin
Kevin McFarlane21-Nov-06 23:49
Kevin McFarlane21-Nov-06 23:49 
Questionthe server returned an invalid or unrecognized response Pin
radixpune21-Nov-06 2:12
radixpune21-Nov-06 2:12 
AnswerRe: the server returned an invalid or unrecognized response Pin
Paul Conrad27-Dec-06 18:03
professionalPaul Conrad27-Dec-06 18:03 
QuestionSmart Device Application in VS 2005 Pin
Irs_ahmad20-Nov-06 20:54
Irs_ahmad20-Nov-06 20:54 
Questionflash proble since last two month Pin
Tauseef A20-Nov-06 18:43
Tauseef A20-Nov-06 18:43 
AnswerRe: flash proble since last two month Pin
Kastellanos Nikos29-Nov-06 3:25
Kastellanos Nikos29-Nov-06 3:25 
QuestionHow can I extract icon from DLL or EXE file ? Pin
Glen Liu20-Nov-06 12:43
Glen Liu20-Nov-06 12:43 
AnswerRe: How can I extract icon from DLL or EXE file ? Pin
Luc Pattyn21-Nov-06 4:43
sitebuilderLuc Pattyn21-Nov-06 4:43 
GeneralRe: How can I extract icon from DLL or EXE file ? Pin
Glen Liu21-Nov-06 4:53
Glen Liu21-Nov-06 4:53 

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.