- Регистрация
- 21.08.2013
- Сообщения
- 249
- Благодарностей
- 12
- Баллы
- 18
I would like to be able to get a random number of items from my list.
Following the documentation example, I would like to be able to replace 20 with another random value generated like this:
How can I replace the 20 from random20 with my randomListValues variable?
Obviously doing this does not work:
Replacing the range values (1,12-15,35-end) with my custom would also be helpfull
Код:
return string.Join(";", project.Lists["List 1"].GetItems("random20(1,12-15,35-end)"));
Код:
Random rnd = new Random();
int randomListValues = rnd.Next(1,7);
Obviously doing this does not work:
Код:
return string.Join(";", project.Lists["List 1"].GetItems("randomrandomListValues(1,12-15,35-end)"));