Archive for the ‘VB.Net’ Category

4
May

Check File exists using .NET framework (VB.NET)

   Posted by: Rasik Jain Tags:

Check If File Exists using VB.Net

FileInfo is a object derived from System.IO name space.

FileInfo has a property called “Exists”. This propery returns true if the file exists. False if file does not exists.

 
=========(VB.NET)===============
Imports System.IO
 
Declare Dim testfile As New FileInfo("c:\My Document\testfile.txt")
 
If testfile.Exists() Then
return true
Else
return false
End If
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • Reddit
  • HackerNews
  • Slashdot
  • StumbleUpon
  • TwitThis
  • Yahoo! Buzz
  • Tumblr
  • Share/Bookmark