Set.empty Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines whether the set is empty.
public:
bool empty();
public bool empty ();
member this.empty : unit -> bool
Public Function empty () As Boolean
Returns
true if the set is empty; otherwise, false.
Remarks
This is equivalent to (elements() == 0).
The following example tests whether there are any elements in a set.
{
Set mySet = new Set(Types::Integer);
;
// ...
if (mySet.empty())
{
print "There are no values in the set";
}
}