How to generate 6 digits continuous numbers in c#?

Rajnilari2015
Posted by Rajnilari2015 under C# category on | Points: 40 | Views : 1167
The below program will help to do so

using System;
using System.Linq;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
var str = GenerateContinuousCode();
}

public static string GenerateContinuousCode()
{
return new string(
Enumerable.Repeat("0123456789", 6)
.Select(s => s[new Random().Next(s.Length)])
.ToArray());

}
}
}

Comments or Responses

Login to post response