Draw of predefined values

0

I have two TextBox ( txtUM , txtDois ), and would like to make a draw of some preprogrammed date / string (Between the dates: 07: 55, 07:56, 07:57, 07:58, 07:59, 08:00, 08:01, 08:02, 08:03, 08:04, 08:05 ). >

The number that was drawn would put in the textbox ( txtUM ), and after another draw another value in

asked by anonymous 20.04.2016 / 00:03

1 answer

2

Place the dates inside an array and draw an integer to match the index of the array.

string[] datas = new string[] { "data 1", "data 2", "data n" };
Random r = new Random();

txtUM.Text = datas[r.Next(datas.Length)];
txtDOIS.Text = datas[r.Next(datas.Length)];
    
20.04.2016 / 00:22