Set.equal(Set) 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 a set is identical to the current set.
public:
bool equal(Microsoft::Dynamics::Ax::Xpp::Set ^ _set2);
public bool equal (Microsoft.Dynamics.Ax.Xpp.Set _set2);
override this.equal : Microsoft.Dynamics.Ax.Xpp.Set -> bool
Public Function equal (_set2 As Set) As Boolean
Parameters
- _set2
- Set
Returns
true if the set is the same as the current set; otherwise, false.
Remarks
For two sets to be equal, they must have the same type and the same number of elements, and all elements must be the same.
The following example creates two sets of integers, adds some values to them, and then compares them to see whether the sets are the same.
{
Set is1 = new Set (Types::Integer);
Set is2 = new Set (Types::Integer);
;
is1.add(1);
is1.add(2);
is1.add(3);
is2.add(2);
is2.add(4);
if (is1.equal(is2))
{
print "The sets are equal";
pause;
}
else
{
print "The sets are not equal";
pause;
}
}