In C# the class Path gives an easy way to get a temporary file for your application but you have to be careful using this API. This API create zero-byte temporary files in Windows temporary folder and when there are 65536 files it gives an IOException saying "The file exists.". But if you need small number of temporary files for short period of time then this API gives you a very easy way of creating temporary file all you need to do is to keep cleaning temporary files you created on regular basis.