Share via


Set.getEnumerator Method

Definition

Creates an enumerator for a set, which allows you to traverse the set.

public:
 Microsoft::Dynamics::Ax::Xpp::SetEnumerator ^ getEnumerator();
public Microsoft.Dynamics.Ax.Xpp.SetEnumerator getEnumerator ();
member this.getEnumerator : unit -> Microsoft.Dynamics.Ax.Xpp.SetEnumerator
Public Function getEnumerator () As SetEnumerator

Returns

A SetEnumerator object for the current set.

Remarks

The following example packs the contents of a set into a container. The getEnumerator method is used to create an enumerator for the set. Therefore, that the elements in the set can be traversed and added to the container.

public static container intSet2Con(Set _intSet) 
{ 
    SetEnumerator se; 
    container     intCon; 
    ; 
    if (!_intSet || !_intSet.elements()) 
    { 
        return conNull(); 
    } 
    se = _intSet.getEnumerator(); 
    while (se.moveNext()) 
    { 
        intCon += se.current(); 
    } 
    return intCon; 
}

Applies to