Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# calendar button random dates

DateTime RandomDay()
    {
        DateTime start = new DateTime(1900, 1, 1);
        Random gen = new Random();

        int range = (DateTime.Today - start).Days;           
        return start.AddDays(gen.Next(range));
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #calendar #button #random #dates
ADD COMMENT
Topic
Name
1+1 =