Welcome to AspAdvice Sign in | Join | Help

Check If A Text File Exist

using System;
using System.IO; 
namespace csharp
{
class Class1
{
static void Main(string[] args)
{

if(File.Exists(@"c:\myfile.txt"))
{
Console.WriteLine("File exists");
}
else
{
Console.WriteLine("Does not exist");
}

}
}
}
Published Tuesday, March 15, 2005 11:35 AM by sswafford
Filed under:

Comments

No Comments

New Comments to this post are disabled