Источник:
http://sysdictcoder.com/blog/dealing-with-containers/
==============
The X++ container is a powerful and somewhat odd datatype. It’s like an array but supports different data types in the same instance and it can grow infinitely large. Also containers don’t have methods like real objects; you need to call special functions and pass your container to them.
Many data structures in X++ are serialized (packed) into containers before they’re sent across the network or stored in the database. The entire SysLastValue framework runs on it.
Unfortunately this kind of flexibility is often abused. It’s very easy to abuse containers and I see it happen too often. In this article I’ll go over some good practices for containers. I won’t go into basics of containers. You can find basic documentation on
MSDN (methods starting with
con).
Appending to containers
Most of the time you want to append something to a container. Typically I come across code like this:
<div class="wp_syntax"><div class="code">
for (i=
1; i