Generate a random sequence in C# using LINQ

Gopesh9
Posted by Gopesh9 under C# category on | Points: 40 | Views : 2278
By using this code you all can generate the random sequence of length N.

Random r = new Random();
var rSequence = Enumerable.Repeat(0, N).Select(i => r.Next());

Comments or Responses

Login to post response