I mean something like (getting your code as example):

```
int variable_1;
int variable_2;
variable_1 = rand.Next(1,14)
do
{
variable_2 = rand.Next(1,14)
} while (variable_2 == variable_1) // If the first try gets the same value it repeats until it generate one that is not equal
```

But this solution can only be taken into consideration if the number of variables to check before accepting the new one is not big, so the conditions don't get too much. Using a recursive function that checks the previous ones and recalls itself if not matching would be another possibility.

Problem with that is: the bigger the number of variables you want to create, the bigger time it gets to find a correct value for the next.

how many variables are you speaking about? And the range for the random numbers? Must all variables have "unique" value?

If there are many variables and all of them must have a unique value you could do another thing, like creating an array to hold the values from 1 to range_limit, sorting them randomally and getting them from there.