Click here to Skip to main content
15,508,473 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to open a word document from C# application Pin
seeism20-Jul-10 20:00
seeism20-Jul-10 20:00 
QuestionError Getting Processor Id Pin
PDTUM19-Jul-10 14:44
PDTUM19-Jul-10 14:44 
AnswerRe: Error Getting Processor Id Pin
Luc Pattyn19-Jul-10 15:20
sitebuilderLuc Pattyn19-Jul-10 15:20 
GeneralRe: Error Getting Processor Id Pin
PDTUM19-Jul-10 17:50
PDTUM19-Jul-10 17:50 
Questionnode hottracking Pin
xilefxilef19-Jul-10 13:39
xilefxilef19-Jul-10 13:39 
Questionpass resource name as variable Pin
Jassim Rahma19-Jul-10 13:21
Jassim Rahma19-Jul-10 13:21 
AnswerRe: pass resource name as variable Pin
Luc Pattyn19-Jul-10 13:40
sitebuilderLuc Pattyn19-Jul-10 13:40 
QuestionCreating a function using Dictionary and Datetime help?? Pin
roman_s19-Jul-10 10:25
roman_s19-Jul-10 10:25 
I am first getting a list of strings from files that have dates in them ex. fileabc_20100612_1020.txt in a certain directory(expression S.ImportFolder)

my objective is to get a list of these dates in from a folder. My problem is that there will be some files with same dates in this case I want to select the newest one for that date like closest to 23:59 of that Date.

for example in c:\Temp there is

fileabc_20100612_1020.txt
fileabc_20100613_1020.txt
fileabc_20100614_1020.txt
fileabc_20100614_2320.txt

I would want to only import

fileabc_20100612_1020.txt
fileabc_20100613_1020.txt
fileabc_20100614_2320.txt

or exclude
fileabc_20100614_1020.txt


            string[] fileEntries = Directory.GetFiles(S.ImportFolder);
            foreach (string fileNameWithRoot in fileEntries)
            {
                string fileName = System.IO.Path.GetFileName(fileNameWithRoot);
....String manipulation.....
                DateTime dtFileName = new DateTime();
            try
                {
                    DateTime dtFileName = Convert.ToDateTime(fileName); 
                }
                catch (Exception e)
                {
                }

                dicFiles.Add(dtFileName, fileName);

AnswerRe: Creating a function using Dictionary and Datetime help?? Pin
Luc Pattyn19-Jul-10 10:36
sitebuilderLuc Pattyn19-Jul-10 10:36 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
roman_s19-Jul-10 10:47
roman_s19-Jul-10 10:47 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
Luc Pattyn19-Jul-10 10:58
sitebuilderLuc Pattyn19-Jul-10 10:58 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
roman_s19-Jul-10 11:52
roman_s19-Jul-10 11:52 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
Luc Pattyn19-Jul-10 12:22
sitebuilderLuc Pattyn19-Jul-10 12:22 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
DaveyM6919-Jul-10 11:02
professionalDaveyM6919-Jul-10 11:02 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
roman_s19-Jul-10 11:46
roman_s19-Jul-10 11:46 
AnswerRe: Creating a function using Dictionary and Datetime help?? Pin
Luc Pattyn19-Jul-10 12:15
sitebuilderLuc Pattyn19-Jul-10 12:15 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
roman_s20-Jul-10 4:35
roman_s20-Jul-10 4:35 
GeneralRe: Creating a function using Dictionary and Datetime help?? Pin
Luc Pattyn20-Jul-10 5:22
sitebuilderLuc Pattyn20-Jul-10 5:22 
Questiongeneric List - Remove Duplicates Pin
Kevin Marois19-Jul-10 8:15
professionalKevin Marois19-Jul-10 8:15 
AnswerRe: generic List - Remove Duplicates Pin
Ennis Ray Lynch, Jr.19-Jul-10 8:20
Ennis Ray Lynch, Jr.19-Jul-10 8:20 
GeneralRe: generic List - Remove Duplicates Pin
Kevin Marois19-Jul-10 8:22
professionalKevin Marois19-Jul-10 8:22 
GeneralRe: generic List - Remove Duplicates Pin
DaveyM6919-Jul-10 8:56
professionalDaveyM6919-Jul-10 8:56 
AnswerRe: generic List - Remove Duplicates Pin
Luc Pattyn19-Jul-10 11:36
sitebuilderLuc Pattyn19-Jul-10 11:36 
QuestionImplementing database roles on menu and button level Pin
DotNetXenon19-Jul-10 7:30
DotNetXenon19-Jul-10 7:30 
AnswerRe: Implementing database roles on menu and button level Pin
Pete O'Hanlon19-Jul-10 7:49
mvaPete O'Hanlon19-Jul-10 7:49 

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.