Interview Questions

Tuesday, April 15, 2014

Containers in AX

In X++, container is one of the primitive types, or value types. container is not a class. A container contains an ordered sequence of primitive values or other containers.
container can be stored in the database. container is one of the column types that you can select when you use the Application Object Tree (AOT) to add a column to a table.
container slightly resembles an array, or collections such as the List or Stack classes. However, you can never change the size or content of a container after the containeris created. X++ statements that appear to modify a container are internally building a new container and copying values as necessary. Even an assignment of a container to another container variable creates a new copy of the container. All of this has performance implications.
In the X++ functions that provide access to a container (such as conPeek), the container is 1 based not 0 based. Indexing is 1 based for arrays, and for everything else in X++.

No comments:

Post a Comment