Random r = new Random();
int randomvalue = r.Next(1,20);
*
*
if(randomvalue == 1) something
if(randomvalue == 2) something
*
*
if(randomvalue == 19) something
What is the best way to make that randomvalue without repeat? Btw: Its WPF, not console.