To create new Random object in c#

Jitendrasoft09
Posted by Jitendrasoft09 under C# category on | Points: 40 | Views : 750
using System;

class Jkexample {

static void Main(string[] args) {


Random myRNG = new Random();

for (int i = 0; i < 5; i++) {
Console.WriteLine("Value: {0}", myRNG.Next(100));
}

Console.ReadLine();
}
}

Comments or Responses

Login to post response