20
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
Random rnd1 = new Random(10); //seed value 10
8
for (int j = 0; j < 4; j++)
9
{
10
Console.WriteLine(rnd1.Next());
11
}
12
13
Console.WriteLine("Using another object");
14
Random rnd2 = new Random(10); //seed value 10
15
for (int j = 0; j < 4; j++)
16
{
17
Console.WriteLine(rnd2.Next());
18
}
19
}
20
}
Cached Result