Click here to Skip to main content
15,949,686 members
Home / Discussions / C#
   

C#

 
GeneralRe: System tray icon says (# Runs)? Pin
Luc Pattyn24-Jan-08 2:22
sitebuilderLuc Pattyn24-Jan-08 2:22 
GeneralRefresh a control Pin
kibromg24-Jan-08 1:31
kibromg24-Jan-08 1:31 
GeneralRe: Refresh a control Pin
Anthony Mushrow24-Jan-08 1:33
professionalAnthony Mushrow24-Jan-08 1:33 
GeneralRe: Refresh a control Pin
kibromg24-Jan-08 1:38
kibromg24-Jan-08 1:38 
GeneralRe: Refresh a control Pin
Anthony Mushrow24-Jan-08 1:43
professionalAnthony Mushrow24-Jan-08 1:43 
GeneralRe: Refresh a control Pin
Paddy Boyd24-Jan-08 2:24
Paddy Boyd24-Jan-08 2:24 
QuestionLooking for latest filename Pin
Ofori Boadu24-Jan-08 1:16
Ofori Boadu24-Jan-08 1:16 
GeneralRe: Looking for latest filename Pin
Luc Pattyn24-Jan-08 1:28
sitebuilderLuc Pattyn24-Jan-08 1: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 0:46
Neo Andreson24-Jan-08 0:46 
AnswerRe: How to get current date from MonthCalander control??? Pin
DaveyM6924-Jan-08 0:53
professionalDaveyM6924-Jan-08 0:53 
Questionhow to block specific url Pin
Tahir Abbasi24-Jan-08 0:29
Tahir Abbasi24-Jan-08 0:29 
AnswerRe: how to block specific url Pin
Anthony Mushrow24-Jan-08 1:06
professionalAnthony Mushrow24-Jan-08 1:06 
QuestionHow to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan23-Jan-08 23:30
Varad_Rajan23-Jan-08 23:30 
AnswerRe: How to disable keydown event in Context Menu Strip ? Pin
Gareth H23-Jan-08 23:49
Gareth H23-Jan-08 23:49 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan24-Jan-08 0:01
Varad_Rajan24-Jan-08 0:01 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan24-Jan-08 0:03
Varad_Rajan24-Jan-08 0:03 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Gareth H24-Jan-08 0:07
Gareth H24-Jan-08 0:07 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Gareth H24-Jan-08 0:04
Gareth H24-Jan-08 0:04 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan24-Jan-08 0:07
Varad_Rajan24-Jan-08 0:07 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Gareth H24-Jan-08 0:18
Gareth H24-Jan-08 0:18 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan24-Jan-08 0:23
Varad_Rajan24-Jan-08 0:23 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Gareth H24-Jan-08 0:30
Gareth H24-Jan-08 0:30 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan24-Jan-08 0:32
Varad_Rajan24-Jan-08 0:32 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Varad_Rajan24-Jan-08 0:34
Varad_Rajan24-Jan-08 0:34 
GeneralRe: How to disable keydown event in Context Menu Strip ? Pin
Anthony Mushrow24-Jan-08 1:03
professionalAnthony Mushrow24-Jan-08 1: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.