AX – D365FO – Collection classes in X++ #d365fo

Reference article :

The collection classes are shown in the following table.

ArraySimilar to the X++ language array type except that it can hold values of any single type, including objects and records. Objects are accessed in a specific order.For more information, see X++, C# Comparison: Array Syntax.
ListContains elements that are accessed sequentially.Unlike the Array class, the List class provides an addStart method.As with the Set class, the List class provides methods getEnumerator and getIterator. You can use an iterator to insert and delete items from a List object.
MapAssociates a key value with another value.
SetHolds values of any single type. Values are not stored in the sequence they are added. Instead, the Set object stores them in a manner that optimizes performance for the in method.When you add a value to a Set object which is already storing that same value, the add attempt is ignored by the Set object.Unlike the Array class, the Set class provides the methods in and remove.
StructCan contain values of more than one type. Used to group information about a specific entity.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s