directory in c#
-
Hi i am trying to check for the existance of a directory using C# but don't know exact format to use it. My.Computer.FileSystem.DirectoryExists("C:\\directoryname") can someone help me by guiding me to the exact way of knowing the existance of directory. regards
sAqIb "Our scientific power has outrun our spiritual power. We have guided missiles and misguided men." Dr. Martin Luther King Jr.
-
Hi i am trying to check for the existance of a directory using C# but don't know exact format to use it. My.Computer.FileSystem.DirectoryExists("C:\\directoryname") can someone help me by guiding me to the exact way of knowing the existance of directory. regards
sAqIb "Our scientific power has outrun our spiritual power. We have guided missiles and misguided men." Dr. Martin Luther King Jr.
-
Hi i am trying to check for the existance of a directory using C# but don't know exact format to use it. My.Computer.FileSystem.DirectoryExists("C:\\directoryname") can someone help me by guiding me to the exact way of knowing the existance of directory. regards
sAqIb "Our scientific power has outrun our spiritual power. We have guided missiles and misguided men." Dr. Martin Luther King Jr.
saqib82 wrote:
My.Computer.FileSystem.DirectoryExists("C:\\directoryname")
This is VB, VB has nasty shortcuts ( nasty because they don't flow to C# ). if (System.IO.Directory.Exists(@"c:\Directoryname")) { // Whatever } The @ allows you to type \ without having to do \\
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
saqib82 wrote:
My.Computer.FileSystem.DirectoryExists("C:\\directoryname")
This is VB, VB has nasty shortcuts ( nasty because they don't flow to C# ). if (System.IO.Directory.Exists(@"c:\Directoryname")) { // Whatever } The @ allows you to type \ without having to do \\
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
Thanks christian, i was trying to do something like we do in vb. But finally i did the same thing that you have suggested. Sorry you are late, but thanks again for your help. regards
sAqIb "Our scientific power has outrun our spiritual power. We have guided missiles and misguided men." Dr. Martin Luther King Jr.