language: C# (mono-2.8)
date: 193 days 19 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using System;
public class Test
{
        public static void Main()
        {
        int my_seed = 100; // change my seed to whatever you want
        Random rand = new Random(my_seed);
        for (int i = 0; i < 10; i++)
        {
            rand = new Random(rand.Next());
        }
        // does this print the same number every run if we don't change the starting seed?
        Console.WriteLine(rand.Next()); // yes, it does
        }
}