I am trying to delete a file when my program draws itself (Using Visual Studio 2008).
Currently using this method
public frmMainMenu()
{
InitializeComponent();
File.Delete("\\Program Files\\smartdeviceproject1\\SendXML\\1.txt");
}
The path for the file is "\Program Files\smartdeviceproject1\SendXML\1.txt"
Yet when the program is executed, breakpointing shows that the line is executed (and no errors are thrwon) but the file remains in the directory
Screen shot - http://imgur.com/F6GOu.jpg
Is it possible that this is not working because I am using the compact framwework?