Array Class [AX 2012]
Collapse the table of content
Expand the table of content

Array Class [AX 2012]

class Array extends Object

Run On


Gg802677.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg802677.pubmethod(en-us,AX.60).gif definitionString Returns a string that contains the definition of the array.
Gg802677.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg802677.pubmethod(en-us,AX.60).gif exists Determines whether a particular array element is valid.
Gg802677.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg802677.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg802677.pubmethod(en-us,AX.60).gif lastIndex Retrieves the highest index that is used to store a value in the array.
Gg802677.pubmethod(en-us,AX.60).gif new Creates an array in which each element has the specified type. (Overrides the new Method.)
Gg802677.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Gg802677.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Gg802677.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg802677.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg802677.pubmethod(en-us,AX.60).gif pack Serializes the current instance of the Array class.
Gg802677.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg802677.pubmethod(en-us,AX.60).gif toString Returns a string that describes the contents of the array. (Overrides the toString Method.)
Gg802677.pubmethod(en-us,AX.60).gif typeId Returns the data type of the values in the array.
Gg802677.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Gg802677.pubmethod(en-us,AX.60).gif value Gets or sets the value of the array element that is stored at the specified index.
Gg802677.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg802677.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Overrides the xml Method.)
Gg802677.pubmethod(en-us,AX.60).gif Gg802677.static(en-us,AX.60).gif ::create Creates an array from the container that is obtained from a previous call to the Array.pack method.
Gg802677.pubmethod(en-us,AX.60).gif Gg802677.static(en-us,AX.60).gif ::createFromXML

Arrays can hold values of any single type, such as objects and records (contrary to the array data type that is built into the X++ language). Objects of this type can be transferred to functions and methods. The values are stored sequentially.

The arrays expand as required. Therefore, no specific dimension of the array is supplied.

The following example creates an array of classes and adds three query objects to the array.

    Array oarray = new Array (Types::Class); 
    oarray.value(1, new query()); 
    oarray.value(2, new query()); 
    oarray.value(4, new query());  
    print oarray.toString(); 
    print oarray.definitionString(); 

Community Additions

© 2015 Microsoft