Click here to Skip to main content
15,846,342 members
Home / Discussions / C#
   

C#

 
GeneralRe: System tray icon says (# Runs)? Pin
Luc Pattyn24-Jan-08 3:22
sitebuilderLuc Pattyn24-Jan-08 3:22 
GeneralRefresh a control Pin
kibromg24-Jan-08 2:31
kibromg24-Jan-08 2:31 
GeneralRe: Refresh a control Pin
Anthony Mushrow24-Jan-08 2:33
professionalAnthony Mushrow24-Jan-08 2:33 
GeneralRe: Refresh a control Pin
kibromg24-Jan-08 2:38
kibromg24-Jan-08 2:38 
GeneralRe: Refresh a control Pin
Anthony Mushrow24-Jan-08 2:43
professionalAnthony Mushrow24-Jan-08 2:43 
GeneralRe: Refresh a control Pin
Paddy Boyd24-Jan-08 3:24
Paddy Boyd24-Jan-08 3:24 
QuestionLooking for latest filename Pin
Ofori Boadu24-Jan-08 2:16
Ofori Boadu24-Jan-08 2:16 
GeneralRe: Looking for latest filename Pin
Luc Pattyn24-Jan-08 2:28
sitebuilderLuc Pattyn24-Jan-08 2:28 
Hi, there are a couple of solutions:

- use Directory.GetFiles() to get all the file names, then find the "highest" file name in those.
- use Directory.GetFiles() to get all the file names, then find the latest file by comparing
creation times using File.GetCreationTime()
- do a binary search for filenames that match your syntax, checking existence with File.Exists()
- teach your app to save the latest file name (a single string) in a fixed location, probably
a file in the same folder ("latestFile.txt").
- teach your app to save the latest file name (a single string) in the registry somewhere.

Probably not good:
- do a linear search for filenames that match your syntax, checking existence with File.Exists();
is slow and might return a hole in the sequence if you somehow deleted an older file.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


QuestionHow to get current date from MonthCalander control??? Pin
Neo Andreson24-Jan-08 1:46
Neo Andreson24-Jan-08 1:46 
AnswerRe: How to get current date from MonthCalander control??? Pin
DaveyM6924-Jan-08 1:53
professionalDaveyM6924-Jan-08 1:53 
Questionhow to block specific url Pin
Tahir Abbasi24-Jan-08 1:29
Tahir Abbasi24-Jan-08 1:29 
AnswerRe: how to block specific url Pin
Anthony Mushrow24-Jan-08 2:06
professionalAnthony Mushrow24-Jan-08 2:06 
QuestionHow to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan24-Jan-08 0:30
Varad_Rajan24-Jan-08 0:30 
AnswerRe: How to disable keydown event in Context Menu Strip ? Pin
Gareth H24-Jan-08 0:49
Gareth H24-Jan-08 0:49 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan24-Jan-08 1:01
Varad_Rajan24-Jan-08 1:01 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan24-Jan-08 1:03
Varad_Rajan24-Jan-08 1:03 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Gareth H24-Jan-08 1:07
Gareth H24-Jan-08 1:07 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Gareth H24-Jan-08 1:04
Gareth H24-Jan-08 1:04 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan24-Jan-08 1:07
Varad_Rajan24-Jan-08 1:07 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Gareth H24-Jan-08 1:18
Gareth H24-Jan-08 1:18 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan24-Jan-08 1:23
Varad_Rajan24-Jan-08 1:23 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Gareth H24-Jan-08 1:30
Gareth H24-Jan-08 1:30 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan24-Jan-08 1:32
Varad_Rajan24-Jan-08 1:32 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan24-Jan-08 1:34
Varad_Rajan24-Jan-08 1:34 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Anthony Mushrow24-Jan-08 2:03
professionalAnthony Mushrow24-Jan-08 2:03 

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.