Web Analytics Made Easy -
StatCounter c# .net 2.0 -- File or Folder - CodingForum

Announcement

Collapse
No announcement yet.

c# .net 2.0 -- File or Folder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • c# .net 2.0 -- File or Folder

    hey, does anyone have a function or a way to determine if a path is a file or a folder?

    i've tried using the File.Exists() and Directory.Exists() but i do not get consistent results.

    Example:

    c://WINDOWS//someFile.txt
    vs
    c://WINDOWS//someFolder

    note, i don't know if i can just check for extensions?? what if the file is of type 'file' and has no extension.
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<

  • #2
    Why are using double forward slashes? It probably should be blackslashes since thats how the file system works on Windows.
    OracleGuy

    Comment


    • #3
      Originally posted by oracleguy View Post
      Why are using double forward slashes? It probably should be blackslashes since thats how the file system works on Windows.
      yea, i know. i don't know why i put the example like that. i meant '\\'
      public string ConjunctionJunction(string words, string phrases, string clauses)
      {
      return (String)(words + phrases + clauses);
      }
      <--- Was I Helpfull? Let me know ---<

      Comment

      Working...
      X