The solution is simpler: don't use Random like that.
Declare a single Random instance at class level (
static
is fine) and use that for both values:
private static Random rand = new Random();
...
int maxprvni = 10;
int maxdruhy = 10;
int druhyc = rand.Next(2, maxdruhy);
int prvnic = rand.Next(1, maxprvni / druhyc);
When you create multiple Random instances, they will almost always produce the same sequence because they are initialised from the system clock. thus, using the clock
again to try and "add extra randomness" isn't really going to help!
Just use a single Random instance and you'll be fine. You will get duplicates, but that's a product of your small phase space (ten items) rather than the generator itself.