public static void SetRandomPropertyValues(MyBusinessObject obj, Random random) { obj.Name = names[random.Next(9)]; obj.UnitPrice = prizes[random.Next(9)]; obj.Date = dates[random.Next(9)]; obj.Discontinued = bools[random.Next(9)]; }