6 February 2014

How to delete an existing file using C#.NET

using System;
using System.IO;

private void DeleteFile()
{
  string FilePath = @"C:\test.xls";
    if (File.Exists(FilePath))
     {
       File.Delete(FilePath);
     }
}

No comments:

Post a Comment