Demonstration of predictability (always prints the same thing) : Random « Development « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;


public class MainClass
{
    public static void Main()
    {
        Random r2 = new Random(99830123);
        Console.WriteLine(r2.Next());
        Console.WriteLine(r2.Next(150000));
        Console.WriteLine(r2.Next(9999, 100750));
        Console.WriteLine(r2.NextDouble());
    }
}
214873035
75274
85587
0.571986661558965








14.14.Random
14.14.1.Generate random number
14.14.2.Demonstration of predictability (always prints the same thing)