Jaa


List.merge(List, List) Method

Definition

Combines two lists to create a new list.

public:
 static Microsoft::Dynamics::Ax::Xpp::List ^ merge(Microsoft::Dynamics::Ax::Xpp::List ^ _list1, Microsoft::Dynamics::Ax::Xpp::List ^ _list2);
public static Microsoft.Dynamics.Ax.Xpp.List merge (Microsoft.Dynamics.Ax.Xpp.List _list1, Microsoft.Dynamics.Ax.Xpp.List _list2);
static member merge : Microsoft.Dynamics.Ax.Xpp.List * Microsoft.Dynamics.Ax.Xpp.List -> Microsoft.Dynamics.Ax.Xpp.List
Public Shared Function merge (_list1 As List, _list2 As List) As List

Parameters

_list1
List

The list that will be added to the end of the first to create the new list.

_list2
List

The list that will be added to the end of the first to create the new list.

Returns

The new list.

Remarks

The types of the lists must be the same.

The following example creates two lists of integer values, merges them to create a new list, and then prints out the values in the new combined list.

{ 
    List list1  = new List(Types::Integer); 
    List list2  = new List(Types::Integer); 
    List combinedList  = new List(Types::Integer); 
    int  i; 
    for(i=1; i<6; i++) 
    { 
        List1.addEnd(i); 
    } 
     for(i=6; i<11; i++) 
    { 
        List2.addEnd(i); 
    } 
    combinedList = List::merge(list1, list2); 
    print combinedList.toString(); 
    pause; 
}

Applies to