The following example demonstrates how to generate a random integers. Random rnd = new Random(); int num = rnd. Next(); Call the Next() method multiple times to get the multiple random numbers, as shown below.