Simple Code to Check If a File Exists in .NET

Category:
Files and Directories
Type:
Snippets
Difficulty:
Beginning
Author:
Anonymous

Version Compatibility: Visual Basic.NET

More information:
This simple function will check if a file exists, and if it does, will return True. If not, it will return False. This requires VB.NET and assumes you have a knowledge of using files within an application.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: