|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Checking whether "SomeString" is Directory or File...Hi,
how can i find out, whether a given string specifies a Path or a file... System.IO.File.Exist(UnknownString) does not work for my application. i exactly need to know if the strng is a path or a file... But how the h*** can i find it out.... Thanks in advance.... Kerem Gümrükcü Hi Kerem,
Please do not multipost, see my answer in the csharp group. The method won't work if you are trying to determine if a string is a valid path (though maybe not on your system) If that is your goal, you may need to check the string for characters defined in the Path.InvalidPathChars property. -- Happy Coding! Morten Wennevik [C# MVP]
Other interesting topics
How to disable .NET Framework 2.0
Coding standard question: using directive & namespace Events & Delegates Protecting Assembly against disassembling... Process.Start - The requested lookup key was not found in any active activation context. streamreader halt simple confirmation on XML comments ... Guru Challenge Request re Dynamic Scripts from Server Challenge/Question for Dynamic (server created) Scripting Gurus Cannot debug projects |
|||||||||||||||||||||||