To delete a file in C#/CSharp, we make use of File class and its static method called Delete. It will take path of the file as parameter. Example is given below.
static void Main(string args)
string path = @"C:\Users\ADMIN\Desktop\delete.txt";