Share via


List.create(Object[]) Method

Definition

Creates a list from the container obtained from a prior call to the List.pack method.

public:
 static Microsoft::Dynamics::Ax::Xpp::List ^ create(cli::array <System::Object ^> ^ _container);
public static Microsoft.Dynamics.Ax.Xpp.List create (object[] _container);
static member create : obj[] -> Microsoft.Dynamics.Ax.Xpp.List
Public Shared Function create (_container As Object()) As List

Parameters

_container
Object[]

The container that holds the packed list.

Returns

A list identical to the one that was packed into the container.

Remarks

The following example creates a list and packs it into a container. The create method is then used to unpack the container and create a list identical to the original one.

{ 
    List il = new List(Types::Integer); 
    List newList; 
    container packedList; 
    // Add some elements 
    il.addEnd(1); 
    il.addEnd(2); 
    il.addEnd(3); 
    // Pack the list into a container 
    packedList = il.pack(); 
    newList = list::create(packedList); 
    // Prints <1, 2, 3> 
    print newList.toString(); 
    pause; 
}

Applies to