The below program will help you to generate random file names and random extensions for those files. C# provide GetRandomFileName function to achieve the same.
C# Example code to generate randome file name:
using System;
using System.IO;
namespace MyApp
{
class Extension_class
{
static void Main()
{
string my_random_file = Path.GetRandomFileName();
Console.WriteLine(my_random_file);
Console.Read();
}
}
}
No comments:
Post a Comment