Показать сообщение отдельно
Старый 08.04.2011, 13:04   #5  
CDR is offline
CDR
MCTS
MCBMSS
 
236 / 175 (6) ++++++
Регистрация: 27.11.2003
Во, нашел в документации по DAX...

Цитата:
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.

A 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 container is 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.

Containers are Immutable.
Some X++ statements with containers might appear like they modify a container, but inside the system this never occurs. Instead, the data from the original container is combined with data from the command to build a new container.

You create a new container every time that you call any of the following functions:
conDel
conIns
conPoke

The following statements all create a new container:
myContainer = [1];
myContainer += [2];
myContainer4 = myContainer5;

A container is best suited for processes that do not involve excessive modification to the size or contents of the container. When a container undergoes excessive additions of data, overall system performance can be decreased by the need to repeatedly copy container data and allocate new space.
Мой вольный перевод:

Контейнер - это value-тип. Контейнер не класс! Контейнер содержит последовательность value-типов или других контейнеров.

Контейнер слегка напоминает классы List или Stack. Однако невозможно изменить размер или содержимое контейнера после его создания. Операторы X++, модифицирующие контейнер, внутри создают новый контейнер и копируют значения.

Контейнеры относятся к immutable объектам.
Каждый раз при использовании следующих функций создается новый контейнер:
conDel
conIns
conPoke
Следующие выражения также создают новый контейнер:
myContainer = [1];
myContainer += [2];
myContainer4 = myContainer5;
__________________
Dynamics AX Experience
За это сообщение автора поблагодарили: mazzy (15), Logger (3).