Delete an existing file using C#.

Posted by Vishalneeraj-24503 under C# category on | Points: 40 | Views : 808
For file related operations,we have to import System.IO Namespace:-
using System;
using System.IO;

private void DeleteFile()
string File_Path = @"D:\abc.xls";
if (File.Exists(File_Path)) //Check whether file is present to avoid exceptions

Comments or Responses

Login to post response