To delete a file in Windows using a WPF app you could use the following code:
public static void DeleteFile()
{
string destinationFile = @"C:\images\d.jpg";
try
{
File.Delete(destinationFile);
}
catch (IOException iox)
{
Console.WriteLine(iox.Message);
}
}
Recent Comments