SetBuilderKeyHasElements 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 indices.

For instance, the following set:

C#
int[] highPriorityIndices = new int[] { 1, 4, 9 };
Set p = Set("p").Represents("prioritized projects").HasElements(highPriorityIndices);
has elements { 1, 4, 9 }.

See Also