Results 1 to 2 of 2

Thread: Does File Exist?

  1. #1

    Thread Starter
    Addicted Member overhill's Avatar
    Join Date
    Mar 2000
    Location
    KS, United States
    Posts
    181

    Does File Exist?

    I am having trouble finding out how to check to see if a certain file exists with VB.NET. I have seen code that uses File.Exists("C:\whatever.txt"), but when I do that I am told that file is not declared. Do I need to reference something extra in order to get this to work or am I doing it all wrong?

    Thanks for any help!

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    I beleive you need to Import System.IO to use the File class.


    Code:
    Imports System.IO
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width