using System;
using System.IO;
namespace Kodecsharp.Example.System.IO {
class FileExistsDemo {
public static void Main(string[] args) {
string fileName = @"c:\users\wsaryada\demo.txt";
//
// The File.Exists() method check to see if a file on the
// specified path exists or not.
//
if (File.Exists(fileName)) {
Console.WriteLine(fileName + " found.");
} else {
Console.WriteLine("Could not locate " + fileName);
}
Console.ReadLine();
}
}
}