top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to Create a Unique temporary file in C# ?

0 votes
139 views
How to Create a Unique temporary file in C# ?
posted May 7, 2016 by Latha

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer
using System;
using System.Collections.Generic;
using System.Linq;

namespace ACCode
{
    class Program
    {
        static void Main(string[] args)
        {
            string temporaryFile = System.IO.Path.GetTempPath() + Guid.NewGuid()+ ".txt";

            Console.WriteLine(temporaryFile);
            Console.ReadLine();
        }       
    } 
}
answer May 7, 2016 by Shivaranjini
...