How can I delete a file in C# e.g. C:\\test.txt, although apply the same kind of method like in batch files e.g.
C:\\test.txt
if exist \"C:\\test.txt\" dele
if (System.IO.File.Exists(@"C:\test.txt")) System.IO.File.Delete(@"C:\test.txt"));
but
System.IO.File.Delete(@"C:\test.txt");
will do the same as long as the folder exists.