Click here to Skip to main content
15,891,253 members
Home / Discussions / C#
   

C#

 
AnswerRe: Neither validators nor Validationsummery is working Pin
Eddy Vluggen26-Sep-14 5:54
professionalEddy Vluggen26-Sep-14 5:54 
GeneralRe: Neither validators nor Validationsummery is working Pin
demoninside926-Sep-14 19:34
demoninside926-Sep-14 19:34 
GeneralRe: Neither validators nor Validationsummery is working Pin
Richard MacCutchan26-Sep-14 21:38
mveRichard MacCutchan26-Sep-14 21:38 
GeneralRe: Neither validators nor Validationsummery is working Pin
Keith Barrow29-Sep-14 22:37
professionalKeith Barrow29-Sep-14 22:37 
QuestionHo to assign a numbering system to the file system hierarchy Pin
Rick450d25-Sep-14 12:41
Rick450d25-Sep-14 12:41 
JokeRe: Ho to assign a numbering system to the file system hierarchy Pin
PIEBALDconsult25-Sep-14 14:02
mvePIEBALDconsult25-Sep-14 14:02 
GeneralRe: Ho to assign a numbering system to the file system hierarchy Pin
SledgeHammer0125-Sep-14 15:06
SledgeHammer0125-Sep-14 15:06 
AnswerRe: Ho to assign a numbering system to the file system hierarchy PinPopular
Freak3025-Sep-14 22:00
Freak3025-Sep-14 22:00 
The way you process the sub folders the order will be different from the example list you posted. I would uses the recursive call directly after each processed folder and pass the relevant values. Also Counter should not be global but local to the function. It would then look something like this.
C#
private void GetSubDirs(string parentFolder, string parentNumber)
{
    string[] SubDirs = Directory.GetDirectories(parentFolder, "*.*", SearchOption.TopDirectoryOnly);
    for (int i = 0; i < SubDirs.Count(); i++)
    {
        string curNumber = String.Format("{0}.{1}", parentNumber, i + 1);
        // Output folder name and curNumber
        GetSubDirs(SubDirs[i], curNumber);
    }
}

I leave it to you how to call the recursive function from the outside.
The good thing about pessimism is, that you are always either right or pleasently surprised.

SuggestionRe: Ho to assign a numbering system to the file system hierarchy Pin
Richard Deeming26-Sep-14 1:14
mveRichard Deeming26-Sep-14 1:14 
GeneralRe: Ho to assign a numbering system to the file system hierarchy Pin
BillWoodruff26-Sep-14 1:22
professionalBillWoodruff26-Sep-14 1:22 
AnswerRe: Ho to assign a numbering system to the file system hierarchy Pin
BillWoodruff26-Sep-14 1:21
professionalBillWoodruff26-Sep-14 1:21 
QuestionHow to extract VBA code from Excel in Visual Studio and read it as text with c#? Pin
Member 1110881725-Sep-14 0:01
Member 1110881725-Sep-14 0:01 
AnswerRe: How to extract VBA code from Excel in Visual Studio and read it as text with c#? Pin
Eddy Vluggen25-Sep-14 2:19
professionalEddy Vluggen25-Sep-14 2:19 
AnswerRe: How to extract VBA code from Excel in Visual Studio and read it as text with c#? Pin
Chris Quinn25-Sep-14 4:41
Chris Quinn25-Sep-14 4:41 
QuestionRecevoir des mails Pin
Member 1110858924-Sep-14 23:51
Member 1110858924-Sep-14 23:51 
SuggestionRe: Recevoir des mails Pin
George Jonsson25-Sep-14 0:07
professionalGeorge Jonsson25-Sep-14 0:07 
GeneralRe: Recevoir des mails Pin
Member 1110858925-Sep-14 0:34
Member 1110858925-Sep-14 0:34 
GeneralRe: Recevoir des mails Pin
Richard MacCutchan25-Sep-14 0:45
mveRichard MacCutchan25-Sep-14 0:45 
AnswerRe: Recevoir des mails Pin
Wayne Gaylard25-Sep-14 0:46
professionalWayne Gaylard25-Sep-14 0:46 
SuggestionRe: Recevoir des mails Pin
Richard Deeming25-Sep-14 2:32
mveRichard Deeming25-Sep-14 2:32 
GeneralRe: Recevoir des mails Pin
Wayne Gaylard25-Sep-14 2:36
professionalWayne Gaylard25-Sep-14 2:36 
AnswerRe: Recevoir des mails Pin
George Jonsson25-Sep-14 0:43
professionalGeorge Jonsson25-Sep-14 0:43 
QuestionC# System.Timers.Timer Elapsed event issue Pin
Gangawane24-Sep-14 23:45
Gangawane24-Sep-14 23:45 
AnswerRe: C# System.Timers.Timer Elapsed event issue Pin
BillWoodruff25-Sep-14 0:00
professionalBillWoodruff25-Sep-14 0:00 
SuggestionRe: C# System.Timers.Timer Elapsed event issue Pin
George Jonsson25-Sep-14 0:32
professionalGeorge Jonsson25-Sep-14 0:32 

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.