Languages
[Edit]
EN

C# / .NET - file delete

9 points
Created by:
Root-ssh
68500

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
Native Advertising
50 000 ad impressions - 449$
🚀
Get your tech brand or product in front of software developers.
For more information contact us:
Red dot
Dirask - friendly IT community for everyone.

❤️💻 🙂

Join