c# – How can I create a temp file with a specific extension with .net? – Stack Overflow
Posted by jpluimers on 2016/01/27
You’d think this is a simple question.
Be amazed by the many ways leading into to creating a temporary file with a specific extension.
This list doesn’t even cover all of them:
- Create a file name based on GetTempPath, a Guid and an extension.
- Use the TempFileCollection from the Compiler in System.CodeDom.
- Get a random file name, then change the extension. Loop until it is unique.
- Use a timestamp to generate unique file names.
All via: c# – How can I create a temp file with a specific extension with .net? – Stack Overflow.
Which one would you choose?
–jeroen
Leave a Reply