Essential Types C# Book

using System;
using System.Numerics;
class Sample
{
public static void Main()
{
var rand = System.Security.Cryptography.RandomNumberGenerator.Create();
byte[] bytes = new byte[32];
rand.GetBytes(bytes);
int i = BitConverter.ToInt32(bytes, 0);
Console.WriteLine(i);
}
}
The output:
1208100698