How to generate a long Random number quickly?

Posted by SheoNarayan under C# category on | Views : 5551

string randomNumber = DateTime.Now.Ticks.ToString();

Ticks property gets the number of ticks that represent the date and time of its instance. In most of the cases this will be unique and this can be used to generate a quick random numbers.

Comments or Responses

Login to post response