Generate a random sequence in C# using LINQ

Posted by Gopesh9 under C# category on | Points: 40 | Views : 1962
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