In a lot of my talks I harp on the fact that using Random.Next() is not actually all that random. The data for Random.Next() is based off of seed data. If the same seed is specified (as you can do in the constructor for Random()) you will get the same outputs every time.

Random random = new Random(27); 
for (int i = 0; i< 5; i++) 
{ 
     Console.WriteLine(random.Next(50)); 
}

Every time I run this code I get: 41, 36, 32, 16, 19

The reason for this is that the generation of the next random number is based on the last number generated (or the seed data if no number has been generated yet).

Now I have not dug into the source code of .NET but I assume like most other languages it uses the linear congruental method that will allow the creation of a fairly randomly distributed range of numbers.

Here is a home grown random class using this method:

Public Class Random
{
    private int lastNumber;
    public void Random(int seed)
    {
         lastNumber = seed;
    }

    public int Next()
    {
         lastNumber = lastNumber * 106 + 1283
         return lastNumber % 6075;
     }
}

Now in .NET the Random() constructor has an option to take no parameters. It internally generates a seed for us. Many other programming languages default the seed to 0 if not specified which would just generate the same numbers over and over again.

This is why I state not to use Random() if you need strong random numbers.

Now the cryptographically strong random numbers are generated in a slower but more.... random fashion by incorporating more entropy into the system (entropy is the disorder or randomness in a closed system). Some of these include:

-The process/thread ID
-Current Time
-Some performance counters
-System info (cpu/memory/page file state/about 100 more)
-About 10 more items

By using all this we get seed data that should statistically never happen again. But by polling all of these sources there is the performance hit.

If you need strong random data please use the System.Security.Cryptograhy.RNGCryptoServiceProvider