How to Delete a File in C# ?

Below is a sample code snippet that demonstrates how to delete a file in C# .

How to Delete a File in C# ?

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.IO;
namespace AbundantcodeConsoleApp
{
    internal class Program
    {
        private static void Main(string[] args)
        {
           string ACFile = @"E:\input.txt";
           File.Delete(ACFile);
           Console.ReadLine();
        }     
    }
    
}
%d