Languages
[Edit]
EN

C# / .NET - file delete

9 points
Created by:
Root-ssh
116170

In C# / .NET it is possible to delete file in following way.

1. File.Delete method example

using System.IO;

public static class Program
{
	public static void Main(string[] args)
	{
		string path = @"C:\path\to\file.txt";

		File.Delete(path);
	}
}

Result:

  1. File.Delete Method - Microsoft Docs

C# / .NET - file API

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join