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

C#

 
AnswerRe: How to open a word document from C# application Pin
Luc Pattyn19-Jul-10 22:57
sitebuilderLuc Pattyn19-Jul-10 22:57 
GeneralRe: How to open a word document from C# application Pin
seeism20-Jul-10 0:26
seeism20-Jul-10 0:26 
GeneralRe: How to open a word document from C# application Pin
seeism20-Jul-10 0:44
seeism20-Jul-10 0:44 
AnswerRe: How to open a word document from C# application Pin
Peace ON19-Jul-10 23:04
Peace ON19-Jul-10 23:04 
GeneralRe: How to open a word document from C# application Pin
seeism20-Jul-10 0:27
seeism20-Jul-10 0:27 
AnswerRe: How to open a word document from C# application Pin
Luc Pattyn20-Jul-10 0:43
sitebuilderLuc Pattyn20-Jul-10 0:43 
GeneralRe: How to open a word document from C# application Pin
seeism20-Jul-10 0:49
seeism20-Jul-10 0:49 
GeneralRe: How to open a word document from C# application Pin
Luc Pattyn20-Jul-10 1:12
sitebuilderLuc Pattyn20-Jul-10 1:12 
GeneralRe: How to open a word document from C# application Pin
seeism20-Jul-10 1:25
seeism20-Jul-10 1:25 
GeneralRe: How to open a word document from C# application Pin
seeism20-Jul-10 19:00
seeism20-Jul-10 19:00 
QuestionError Getting Processor Id Pin
PDTUM19-Jul-10 13:44
PDTUM19-Jul-10 13:44 
AnswerRe: Error Getting Processor Id Pin
Luc Pattyn19-Jul-10 14:20
sitebuilderLuc Pattyn19-Jul-10 14:20 
GeneralRe: Error Getting Processor Id Pin
PDTUM19-Jul-10 16:50
PDTUM19-Jul-10 16:50 
Questionnode hottracking Pin
xilefxilef19-Jul-10 12:39
xilefxilef19-Jul-10 12:39 
Questionpass resource name as variable Pin
Jassim Rahma19-Jul-10 12:21
Jassim Rahma19-Jul-10 12:21 
AnswerRe: pass resource name as variable Pin
Luc Pattyn19-Jul-10 12:40
sitebuilderLuc Pattyn19-Jul-10 12:40 
QuestionCreating a function using Dictionary and Datetime help?? Pin
roman_s19-Jul-10 9:25
roman_s19-Jul-10 9:25 
AnswerRe: Creating a function using Dictionary and Datetime help?? Pin
Luc Pattyn19-Jul-10 9:36
sitebuilderLuc Pattyn19-Jul-10 9:36 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
roman_s19-Jul-10 9:47
roman_s19-Jul-10 9:47 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
Luc Pattyn19-Jul-10 9:58
sitebuilderLuc Pattyn19-Jul-10 9:58 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
roman_s19-Jul-10 10:52
roman_s19-Jul-10 10:52 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
Luc Pattyn19-Jul-10 11:22
sitebuilderLuc Pattyn19-Jul-10 11:22 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
DaveyM6919-Jul-10 10:02
professionalDaveyM6919-Jul-10 10:02 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
roman_s19-Jul-10 10:46
roman_s19-Jul-10 10:46 
AnswerRe: Creating a function using Dictionary and Datetime help?? Pin
Luc Pattyn19-Jul-10 11:15
sitebuilderLuc Pattyn19-Jul-10 11:15 
You're making it all way too complex. Here is what I would do (untested!):

string[] files = Directory.GetFiles(S.ImportFolder);
Array.Sort(files);
int count=files.Length;
for(int i=1; i<=count; i++) {
    string curr=files[i-1];
    string next="_the_end_";
    if (i<count) next=files[i];
    if (strcmp(curr.Substring(0,curr.LastIndexOf('_')), next.Substring(0,next.LastIndexOf('_'))!=0) {
        // process or store curr as it is the last one of this date
    }
}


Some nasty trick was used to make sure the last file is also included.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


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.