Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. // OrtizOL - xCSw - http://ortizol.blogspot.com
  2.  
  3. using System;
  4. using System.IO;
  5.  
  6. namespace Receta.CSharp.R0521
  7. {
  8.     public class UsoGetRandomFileName
  9.     {
  10.         public static void Main()
  11.         {
  12.             Console.WriteLine(Environment.NewLine);
  13.            
  14.             string cadenaAleatoria = Path.GetRandomFileName();
  15.            
  16.             for (int i = 1; i <= 25; ++i)
  17.             {
  18.                 Console.WriteLine("Nombre de archivo aleatorio (criptográficamente fuerte): {0}",
  19.                               cadenaAleatoria);
  20.                
  21.                 cadenaAleatoria = Path.GetRandomFileName();
  22.             }
  23.            
  24.             Console.WriteLine(Environment.NewLine);
  25.         }
  26.     }
  27. }