Use RandomNumberGenerator : RandomNumberGenerator : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » RandomNumberGenerator »

 

Use RandomNumberGenerator








    


using System;
using System.Security.Cryptography;

class MainClass {
    public static void Main() {
        byte[] number = new byte[32];
        RandomNumberGenerator rng = RandomNumberGenerator.Create();
        rng.GetBytes(number);

        Console.WriteLine(BitConverter.ToString(number));

    }
}
           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» RandomNumberGenerator