SetBuilderDefinitionHasElements Method

Overload List

HasElements(FuncIEnumerableInt32, String) Finalizes the set builder and returns the resulting set.

The set generates elements by the function getIndices.

For instance, the following set:

C#
IEnumerable<int> GetHighPriorityIndices() => new int[] { 1, 4, 9 };
Set p = Set("p").Represents("prioritized projects").HasElements(GetHighPriorityIndices);
has elements { 1, 4, 9 }.
HasElements(IEnumerableInt32, String) Finalizes the set builder and returns the resulting set.

The set generates elements in [start, untilExclusive).

For instance, the following set:

C#
Set i = Set("i").Represents("resources").HasElementsIn(1, 4);
has elements { 1, 2, 3 }.

See Also