Deleting Files : File Delete « File Directory Stream « C# / CSharp Tutorial






using System;
using System.IO;

public class MainClass
{
  static void Main(string[] args)
  {
    FileInfo MyFile = new FileInfo(@"c:\Projects\Testing.txt");

    MyFile.Create();
    MyFile.Delete();
  }
}








15.3.File Delete
15.3.1.Deleting Files