c# random 3,4 oder6 code example Example: c# random int Random rnd = new Random(); int number = rnd.Next(1, 10);