Random DateTime in the range (C#)

So You need a random DateTime value in some range, and C# Random class does not provide Random.NextDateTime(from, to). Here’s a simple solution for this problem…

  As this method is written as an extension method to Random class, you’ll be able to use it just as a static Random class method (Random.NextDateTime(startDateTime, endDateTime). […]

Read More