Click here to Skip to main content
15,901,373 members
Home / Discussions / C#
   

C#

 
GeneralRe: Exporting Datatable to Excel [Ignore repost] Pin
PIEBALDconsult15-Aug-08 4:10
mvePIEBALDconsult15-Aug-08 4:10 
GeneralRe: Exporting Datatable to Excel [Ignore repost] Pin
Manas Bhardwaj15-Aug-08 4:20
professionalManas Bhardwaj15-Aug-08 4:20 
AnswerRe: Exporting Datatable to Excel Pin
PIEBALDconsult15-Aug-08 4:12
mvePIEBALDconsult15-Aug-08 4:12 
QuestionPassing Interface as a parameter Pin
sreerani15-Aug-08 3:16
sreerani15-Aug-08 3:16 
AnswerRe: Passing Interface as a parameter Pin
0x3c015-Aug-08 3:43
0x3c015-Aug-08 3:43 
AnswerRe: Passing Interface as a parameter Pin
Pete O'Hanlon15-Aug-08 8:33
mvePete O'Hanlon15-Aug-08 8:33 
QuestionCan a file be opened? Pin
__DanC__15-Aug-08 2:43
__DanC__15-Aug-08 2:43 
AnswerRe: Can a file be opened? Pin
Anthony Mushrow15-Aug-08 2:57
professionalAnthony Mushrow15-Aug-08 2:57 
File.Open Although it is basically the same thing.

Waiting for the exception will not be slow though. You try to open the file, and if it can't it tells you so in the form of an exception. If no exception is thrown then you know the file has been opened succesfully.

It's probably much better than calling CreateFile then checking the handle.


__DanC__ wrote:
Is there any way I can instantly tell if a file can be opened?

The only way is to try and open it. How do you know if a door is locked if you don't try to open it first, psychic powers?

My current favourite word is: I'm starting to run out of fav. words!
-SK Genius

Game Programming articles start -here[^]-

GeneralRe: Can a file be opened? Pin
__DanC__15-Aug-08 2:58
__DanC__15-Aug-08 2:58 
GeneralRe: Can a file be opened? Pin
PIEBALDconsult15-Aug-08 3:15
mvePIEBALDconsult15-Aug-08 3:15 
GeneralRe: Can a file be opened? Pin
__DanC__15-Aug-08 3:37
__DanC__15-Aug-08 3:37 
GeneralRe: Can a file be opened? Pin
Anthony Mushrow15-Aug-08 6:28
professionalAnthony Mushrow15-Aug-08 6:28 
Questionvideo indexer Pin
sana1715-Aug-08 0:47
sana1715-Aug-08 0:47 
AnswerRe: video indexer Pin
AhsanS15-Aug-08 1:15
AhsanS15-Aug-08 1:15 
GeneralRe: video indexer Pin
sana1715-Aug-08 8:41
sana1715-Aug-08 8:41 
AnswerRe: video indexer Pin
Ashfield15-Aug-08 1:18
Ashfield15-Aug-08 1:18 
AnswerRe: video indexer Pin
#realJSOP15-Aug-08 1:22
professional#realJSOP15-Aug-08 1:22 
AnswerRe: video indexer Pin
blackjack215015-Aug-08 1:41
blackjack215015-Aug-08 1:41 
AnswerRe: video indexer Pin
Manas Bhardwaj15-Aug-08 2:03
professionalManas Bhardwaj15-Aug-08 2:03 
QuestionAdd event to DataGridViewTextBoxColumn Pin
kaasir_214-Aug-08 22:32
kaasir_214-Aug-08 22:32 
AnswerRe: Add event to DataGridViewTextBoxColumn Pin
teejayem15-Aug-08 2:21
teejayem15-Aug-08 2:21 
Questionnetflow collector. Pin
Stephen Lintott14-Aug-08 22:31
Stephen Lintott14-Aug-08 22:31 
AnswerRe: netflow collector. Pin
leppie14-Aug-08 23:31
leppie14-Aug-08 23:31 
GeneralRe: netflow collector. Pin
Stephen Lintott14-Aug-08 23:35
Stephen Lintott14-Aug-08 23:35 
GeneralRe: netflow collector. Pin
leppie14-Aug-08 23:41
leppie14-Aug-08 23:41 

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.