Is there an equivalent java File.deleteOnExit () in .NET BCL?

Perhaps I could make the application domain and connect to the DomainUnload event, but I would like to do this in the main application domain.

+3
source share
1 answer

In .net there is no analogue: (

You have the right idea, you will need to explicitly delete it.

// Delete the previously created file.
File.Delete(filepath);
+1
source

All Articles