File.Exists(String fileName) : File « System.IO « C# / C Sharp by API






File.Exists(String fileName)

  

using System;
using System.IO;

static class MainClass
{
    static void Main(string[] args)
    {

        Console.WriteLine(File.Exists("c:\\test.txt"));
    }
}

   
    
  








Related examples in the same category

1.File.CreateText(String fileName)
2.File.Delete
3.File.GetLastAccessTime
4.File.OpenRead
5.File.OpenText
6.File.OpenWrite
7.File.ReadAllLines(String fileName)
8.File.SetAccessControl
9.File.WriteAllLines(String fileName, String[] lines)