Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
turbosupramk326-Mar-12 4:58
turbosupramk326-Mar-12 4:58 
AnswerRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
Eddy Vluggen26-Mar-12 7:27
professionalEddy Vluggen26-Mar-12 7:27 
GeneralRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
turbosupramk326-Mar-12 8:23
turbosupramk326-Mar-12 8:23 
QuestionChange the color of the mouse cursor (cross cursor) Pin
Wolfgang Kurz23-Mar-12 8:16
professionalWolfgang Kurz23-Mar-12 8:16 
AnswerRe: Change the color of the mouse cursor (cross cursor) Pin
OriginalGriff23-Mar-12 9:14
mveOriginalGriff23-Mar-12 9:14 
AnswerRe: Change the color of the mouse cursor (cross cursor) Pin
Philippe Mori23-Mar-12 12:35
Philippe Mori23-Mar-12 12:35 
GeneralRe: Change the color of the mouse cursor (cross cursor) Pin
Wolfgang Kurz23-Mar-12 23:08
professionalWolfgang Kurz23-Mar-12 23:08 
QuestionDirectoryInfo throwing ArgumentException Pin
MichCl23-Mar-12 4:53
MichCl23-Mar-12 4:53 
Hi all. I have a read/write project. In this part, I'm getting ready to read from the file, but before I do that, I check to make sure the fileNamePath exists, and if it doesn't I use my default path to get the filename from. So, I'm passing a fileNamePath to my method and I want to check if the directory exists before I use it.

My fileNamePath for this test is defined as an empty string, @"", so it doesn't exist. When I create my DirectoryInfo with the path, it's throwing the System.ArgumentException. This is how I create it:

DirectoryInfo di1 = new DirectoryInfo(fileNamePath);//throws exception

After this, I would do this:
if(di1.Exists) //but it doesn't get this far.

Any ideas what the problem could be? I just need to detect that the directory doesn't exist so I can use my default dir. I've tried

myTempDir = Path.GetDirectoryName(fileNamePath);
if(Directory.Exists(myTempDir)

but that had issues too.

Thanks!!
AnswerRe: DirectoryInfo throwing ArgumentException Pin
Wes Aday23-Mar-12 5:00
professionalWes Aday23-Mar-12 5:00 
GeneralRe: DirectoryInfo throwing ArgumentException Pin
MichCl23-Mar-12 5:25
MichCl23-Mar-12 5:25 
GeneralRe: DirectoryInfo throwing ArgumentException Pin
Wes Aday23-Mar-12 5:44
professionalWes Aday23-Mar-12 5:44 
GeneralRe: DirectoryInfo throwing ArgumentException Pin
MichCl23-Mar-12 7:46
MichCl23-Mar-12 7:46 
AnswerRe: DirectoryInfo throwing ArgumentException Pin
fjdiewornncalwe23-Mar-12 7:09
professionalfjdiewornncalwe23-Mar-12 7:09 
GeneralRe: DirectoryInfo throwing ArgumentException Pin
MichCl23-Mar-12 8:24
MichCl23-Mar-12 8:24 
GeneralRe: DirectoryInfo throwing ArgumentException Pin
fjdiewornncalwe23-Mar-12 9:12
professionalfjdiewornncalwe23-Mar-12 9:12 
AnswerRe: DirectoryInfo throwing ArgumentException Pin
Alan N23-Mar-12 7:32
Alan N23-Mar-12 7:32 
GeneralRe: DirectoryInfo throwing ArgumentException Pin
MichCl23-Mar-12 7:47
MichCl23-Mar-12 7:47 
GeneralRe: DirectoryInfo throwing ArgumentException Pin
Alan N23-Mar-12 7:55
Alan N23-Mar-12 7:55 
QuestionHow to get number of hits occurred for a particular keyword from Gnews,facebook and twitter.. Pin
ajaysinghrathore00723-Mar-12 4:03
ajaysinghrathore00723-Mar-12 4:03 
AnswerRe: How to get number of hits occurred for a particular keyword from Gnews,facebook and twitter.. Pin
Eddy Vluggen23-Mar-12 6:29
professionalEddy Vluggen23-Mar-12 6:29 
Questionfor get the tool bar Pin
cool_kp22-Mar-12 22:11
cool_kp22-Mar-12 22:11 
AnswerRe: for get the tool bar Pin
Pete O'Hanlon22-Mar-12 23:34
mvePete O'Hanlon22-Mar-12 23:34 
GeneralRe: for get the tool bar Pin
cool_kp23-Mar-12 6:05
cool_kp23-Mar-12 6:05 
AnswerRe: for get the tool bar Pin
Vipin_Arora23-Mar-12 0:54
Vipin_Arora23-Mar-12 0:54 
GeneralRe: for get the tool bar Pin
cool_kp23-Mar-12 6:12
cool_kp23-Mar-12 6:12 

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.