Click here to Skip to main content
16,007,814 members
Home / Discussions / C#
   

C#

 
AnswerRe: I need practical ideas for IT engineering Graduation Project Pin
snorkie27-Jul-07 11:09
professionalsnorkie27-Jul-07 11:09 
AnswerRe: I need practical ideas for IT engineering Graduation Project Pin
Paul Conrad28-Jul-07 11:24
professionalPaul Conrad28-Jul-07 11:24 
QuestionHow can I edit a database row and then update it ? Pin
eni_9427-Jul-07 10:43
eni_9427-Jul-07 10:43 
QuestionWindows Forms Messages Problem Pin
gopher_uk27-Jul-07 9:57
gopher_uk27-Jul-07 9:57 
AnswerRe: Windows Forms Messages Problem Pin
User 665829-Jul-07 7:14
User 665829-Jul-07 7:14 
QuestionFile Streamer Problems Pin
ytubis27-Jul-07 9:44
ytubis27-Jul-07 9:44 
AnswerRe: File Streamer Problems Pin
BoneSoft27-Jul-07 9:55
BoneSoft27-Jul-07 9:55 
AnswerRe: File Streamer Problems Pin
Luc Pattyn27-Jul-07 9:59
sitebuilderLuc Pattyn27-Jul-07 9:59 
Hi,

good question, I will surprise you.

First of all, you should watch the line numbers: when building a debug version,
the Exception normally shows line numbers (at least for your code, not for
system libraries).

My guess is the line number points to File.Delete

Yes you can not delete your own file, because someone else is accessing it.
That someone is trying to help you somehow; I dont know who it is, here are the
usual suspects:

- some anti-virus tool
- some indexing utility, say Google Desktop Search

such tools are always interested in the latest files !

Remedy: make a method to delete a file; the method should:
- use a for loop (say 5 times), inside it:
- use try-catch,
- in the try part File.Delete and return
- in the catch part: Thread.Sleep(1000) followed by
if (last iteration) File.Delete

This code tries to delete 6 times, with 1 second interval; the last one
throws to the caller, the first 5 just make you wait.

The surprise is: this is exactly what Windows Explorer is doing, when
it cannot delete at first, it retries 5 times before telling you it failed !

Good luck !



AnswerRe: File Streamer Problems Pin
snorkie27-Jul-07 10:01
professionalsnorkie27-Jul-07 10:01 
AnswerRe: File Streamer Problems Pin
PhilDanger27-Jul-07 10:34
PhilDanger27-Jul-07 10:34 
QuestionPerformance difference?? Pin
Shy Agam27-Jul-07 9:42
Shy Agam27-Jul-07 9:42 
AnswerRe: Performance difference?? Pin
BoneSoft27-Jul-07 9:52
BoneSoft27-Jul-07 9:52 
AnswerRe: Performance difference?? Pin
Shy Agam27-Jul-07 10:02
Shy Agam27-Jul-07 10:02 
GeneralRe: Performance difference?? Pin
Luc Pattyn27-Jul-07 10:10
sitebuilderLuc Pattyn27-Jul-07 10:10 
GeneralRe: Performance difference?? Pin
Shy Agam27-Jul-07 10:13
Shy Agam27-Jul-07 10:13 
AnswerRe: Performance difference?? Pin
Luc Pattyn27-Jul-07 10:06
sitebuilderLuc Pattyn27-Jul-07 10:06 
GeneralRe: Performance difference?? Pin
BoneSoft27-Jul-07 10:29
BoneSoft27-Jul-07 10:29 
GeneralRe: Performance difference?? Pin
Luc Pattyn27-Jul-07 10:46
sitebuilderLuc Pattyn27-Jul-07 10:46 
AnswerRe: Performance difference?? Pin
Paul Conrad27-Jul-07 10:07
professionalPaul Conrad27-Jul-07 10:07 
AnswerRe: Performance difference?? Pin
snorkie27-Jul-07 10:51
professionalsnorkie27-Jul-07 10:51 
GeneralRe: Performance difference?? Pin
PIEBALDconsult27-Jul-07 13:38
mvePIEBALDconsult27-Jul-07 13:38 
GeneralRe: Performance difference?? Pin
Luc Pattyn27-Jul-07 14:57
sitebuilderLuc Pattyn27-Jul-07 14:57 
AnswerMessage formatting question (expires on sunday) Pin
Luc Pattyn27-Jul-07 23:36
sitebuilderLuc Pattyn27-Jul-07 23:36 
GeneralRe: Message formatting question (expires on sunday) Pin
Shy Agam28-Jul-07 1:41
Shy Agam28-Jul-07 1:41 
GeneralRe: Message formatting question (expires on sunday) Pin
Luc Pattyn28-Jul-07 2:18
sitebuilderLuc Pattyn28-Jul-07 2:18 

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.