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
{
File.Delete(File_Path);
}
}